This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2011年06月24日 21:57 by henry.precheur, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| empty_environment.diff | henry.precheur, 2011年06月27日 12:43 | |||
| Messages (4) | |||
|---|---|---|---|
| msg138993 - (view) | Author: Henry Precheur (henry.precheur) | Date: 2011年06月24日 21:57 | |
"make test" calls Python with the -E option which ignore the PYTHON* environment variables, but Python sub-processes aren't necessarily called with the -E options. For example test_displayhook_unencodable in test_cmd_line. This created problems with my own PYTHONSTARTUP script. I see 2 solutions to this problems: 1. Fix the tests that might be affected by such problems, by adding the -E option everywhere needed. 2. Fix the Makefile and unset all the PYTHON* environment variables in it. I think that solution #2 is better. Fixing the tests can be done today, but the authors of future tests might not be aware of this issue. By fixing the Makefile we prevent this problem to occur again in the future. |
|||
| msg139263 - (view) | Author: Henry Precheur (henry.precheur) | Date: 2011年06月27日 12:43 | |
Here's a small patch to call regression tests without any environment variable defined. It's probably a good thing to run all the tests with a clean state, this way they are less likely to fail for mysterious external reasons. For example test_displayhook_unencodable was failing because I was overriding displayhook in my PYTHONSTARTUP file. On the other hand, some problems with environment variables might go unnoticed. But I don't think there's much risk. Note that test_distutils will fail with this patch if #12420 is not taken care of beforehand. |
|||
| msg221753 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014年06月27日 23:43 | |
Can we have a formal patch review please as "make test" means nothing to me. |
|||
| msg221757 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2014年06月28日 00:11 | |
> 1. Fix the tests that might be affected by such problems, by adding the -E option everywhere needed. Yes, this is the right fix. I'm closing this issue because it didn't get any activity since 3 years. If you are interested to add -E in tests, please open a new issue with a patch. empty_environment.diff is wrong, we should ignore PYTHON environement variables to have reliable tests. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:18 | admin | set | github: 56610 |
| 2014年06月28日 00:11:25 | vstinner | set | status: open -> closed resolution: not a bug messages: + msg221757 |
| 2014年06月27日 23:43:29 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg221753 versions: + Python 3.4, Python 3.5, - Python 3.2, Python 3.3 |
| 2011年07月21日 05:47:15 | ezio.melotti | set | nosy:
+ vstinner |
| 2011年07月02日 07:45:07 | terry.reedy | set | nosy:
+ ezio.melotti, michael.foord |
| 2011年06月27日 12:43:58 | henry.precheur | set | files:
+ empty_environment.diff keywords: + patch messages: + msg139263 |
| 2011年06月24日 23:00:28 | Arfrever | set | nosy:
+ Arfrever |
| 2011年06月24日 21:57:56 | henry.precheur | create | |