Message263291
| Author |
vstinner |
| Recipients |
vstinner |
| Date |
2016年04月13日.00:51:33 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1460508695.22.0.184623410488.issue26742@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
---
$ ./python -Wd -m test -j0 test_warnings
Run tests in parallel using 6 child processes
0:00:01 [1/1] test_warnings
(...)
Warning -- warnings.filters was modified by test_warnings
1 test altered the execution environment:
test_warnings
Total duration: 0:00:02
---
The problem are these two lines in test_warnings/__init__.py:
---
py_warnings = support.import_fresh_module('warnings', blocked=['_warnings'])
c_warnings = support.import_fresh_module('warnings', fresh=['_warnings'])
---
Each fresh "import warnings" calls _processoptions(sys.warnoptions) which can change warning filters.
Attached patch saves/restores warnings.filter to fix the resource warning from the test suite.
Note: the warning is not emited if tests are run sequentially (without the -jN option). |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年04月13日 00:51:35 | vstinner | set | recipients:
+ vstinner |
| 2016年04月13日 00:51:35 | vstinner | set | messageid: <1460508695.22.0.184623410488.issue26742@psf.upfronthosting.co.za> |
| 2016年04月13日 00:51:35 | vstinner | link | issue26742 messages |
| 2016年04月13日 00:51:34 | vstinner | create |
|