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 2015年11月27日 18:07 by serhiy.storchaka, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg255471 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年11月27日 18:07 | |
$ ./python -m test.regrtest -uall -R 3:3 test_unittest [1/1] test_unittest test test_unittest failed -- multiple errors occurred; run in verbose mode for details 1 test failed: test_unittest $ ./python -m test.regrtest -vvuall -R 3:3 test_unittest ... ====================================================================== ERROR: test_discover_with_init_module_that_raises_SkipTest_on_import (unittest.test.test_discovery.TestDiscovery) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython-debug/Lib/unittest/test/test_discovery.py", line 532, in test_discover_with_init_module_that_raises_SkipTest_on_import pickle.loads(pickle.dumps(suite, proto)) _pickle.PicklingError: Can't pickle <class 'unittest.loader.ModuleSkipped'>: attribute lookup ModuleSkipped on unittest.loader failed ====================================================================== ERROR: test_discover_with_module_that_raises_SkipTest_on_import (unittest.test.test_discovery.TestDiscovery) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython-debug/Lib/unittest/test/test_discovery.py", line 508, in test_discover_with_module_that_raises_SkipTest_on_import pickle.loads(pickle.dumps(suite, proto)) _pickle.PicklingError: Can't pickle <class 'unittest.loader.ModuleSkipped'>: attribute lookup ModuleSkipped on unittest.loader failed ---------------------------------------------------------------------- |
|||
| msg273176 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2016年08月20日 00:44 | |
While checking that I didn't introduce a reference leak recently with my changes around _PyObject_FastCall(), I found the same issue: test_unittest doesn't work with regrtest -R. I get the same error: $ ./python -m test -R 0:1 -v test_unittest ====================================================================== ERROR: test_discover_with_init_module_that_raises_SkipTest_on_import (unittest.test.test_discovery.TestDiscovery) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/haypo/prog/python/default/Lib/unittest/test/test_discovery.py", line 572, in test_discover_with_init_module_that_raises_SkipTest_on_import pickle.loads(pickle.dumps(suite, proto)) _pickle.PicklingError: Can't pickle <class 'unittest.loader.ModuleSkipped'>: attribute lookup ModuleSkipped on unittest.loader failed ====================================================================== ERROR: test_discover_with_module_that_raises_SkipTest_on_import (unittest.test.test_discovery.TestDiscovery) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/haypo/prog/python/default/Lib/unittest/test/test_discovery.py", line 548, in test_discover_with_module_that_raises_SkipTest_on_import pickle.loads(pickle.dumps(suite, proto)) _pickle.PicklingError: Can't pickle <class 'unittest.loader.ModuleSkipped'>: attribute lookup ModuleSkipped on unittest.loader failed ---------------------------------------------------------------------- |
|||
| msg273210 - (view) | Author: Xiang Zhang (xiang.zhang) * (Python committer) | Date: 2016年08月20日 13:43 | |
Simple reproduction:
>>> pickle.dumps(unittest.loader._make_skipped_test('hello', RuntimeError, unittest.suite.TestSuite))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
_pickle.PicklingError: Can't pickle <class 'unittest.loader.ModuleSkipped'>: attribute lookup ModuleSkipped on unittest.loader failed
Exporting ModuleSkipped in unittest.loader can solve this. But maybe any more elegant method?
|
|||
| msg298135 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2017年07月11日 07:04 | |
Fixed in duplicate issue30813. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:24 | admin | set | github: 69932 |
| 2017年07月11日 07:04:23 | serhiy.storchaka | set | status: open -> closed superseder: test_unittest fails when hunting reference leaks messages: + msg298135 resolution: fixed stage: needs patch -> resolved |
| 2016年12月05日 07:32:55 | serhiy.storchaka | link | issue28873 superseder |
| 2016年08月20日 13:43:49 | xiang.zhang | set | nosy:
+ xiang.zhang messages: + msg273210 |
| 2016年08月20日 00:44:55 | vstinner | set | nosy:
+ vstinner messages: + msg273176 |
| 2015年12月31日 00:31:04 | ezio.melotti | set | stage: needs patch |
| 2015年11月27日 18:07:31 | serhiy.storchaka | create | |