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.

Author vstinner
Recipients vstinner
Date 2015-01-01.22:38:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1420151939.5.0.279924205041.issue23145@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2015-01-01 22:38:59vstinnersetrecipients: + vstinner
2015-01-01 22:38:59vstinnersetmessageid: <1420151939.5.0.279924205041.issue23145@psf.upfronthosting.co.za>
2015-01-01 22:38:59vstinnerlinkissue23145 messages
2015-01-01 22:38:59vstinnercreate