Message233298
Currently, when regrtest fails to load a test submodule, no exception is raised, no error is logged.
I propose to at least log all loader errors: see attached regrtest.patch.
For an example, try to apply the attached test_asyncio_bug.patch and run:
./python -m test -m test_not_implemented test_asyncio
The current output is:
---
[1/1] test_asyncio
1 test OK.
---
The output with regrtest.patch:
---
haypo@selma$ ./python -m test -m test_not_implemented test_asyncio
[1/1] test_asyncio
Failed to import test module: test.test_asyncio.test_base_events
Traceback (most recent call last):
File "/home/haypo/prog/python/default/Lib/unittest/loader.py", line 417, in _find_test_path
module = self._get_module_from_name(name)
File "/home/haypo/prog/python/default/Lib/unittest/loader.py", line 358, in _get_module_from_name
__import__(name)
File "/home/haypo/prog/python/default/Lib/test/test_asyncio/test_base_events.py", line 29
class BaseEventLoopTests(test_utils.TestCase)
^
SyntaxError: invalid syntax
1 test OK.
---
Or should we raise an exception instead? |
|
Date |
User |
Action |
Args |
2015-01-01 22:38:59 | vstinner | set | recipients:
+ vstinner |
2015-01-01 22:38:59 | vstinner | set | messageid: <1420151939.5.0.279924205041.issue23145@psf.upfronthosting.co.za> |
2015-01-01 22:38:59 | vstinner | link | issue23145 messages |
2015-01-01 22:38:59 | vstinner | create | |
|