[New-bugs-announce] [issue14382] test_unittest crashes loading 'unittest.test.testmock' when run from installed Python

Ned Deily report at bugs.python.org
Thu Mar 22 01:07:17 CET 2012


New submission from Ned Deily <nad at acm.org>:

When run from an installed location, rather than from the build directory, test_unittest now crashes:

$ ./root/bin/python3.3 -m test -w -uall,-largefile test_unittest
[1/1] test_unittest
test test_unittest crashed -- Traceback (most recent call last):
  File "/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/test/regrtest.py", line 1236, in runtest_inner
    indirect_test()
  File "/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/test/test_unittest.py", line 8, in test_main
    support.run_unittest(unittest.test.suite())
  File "/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/unittest/test/__init__.py", line 17, in suite
    suite.addTest(loader.loadTestsFromName('unittest.test.testmock'))
  File "/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/unittest/loader.py", line 105, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'testmock'

1 test failed:
    test_unittest
Re-running failed tests in verbose mode
Re-running test 'test_unittest' in verbose mode
test test_unittest crashed -- Traceback (most recent call last):
  File "/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/test/regrtest.py", line 1236, in runtest_inner
    indirect_test()
  File "/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/test/test_unittest.py", line 8, in test_main
    support.run_unittest(unittest.test.suite())
  File "/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/unittest/test/__init__.py", line 17, in suite
    suite.addTest(loader.loadTestsFromName('unittest.test.testmock'))
  File "/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/unittest/loader.py", line 105, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'testmock'

----------
components: Tests
messages: 156526
nosy: michael.foord, ned.deily
priority: normal
severity: normal
stage: needs patch
status: open
title: test_unittest crashes loading 'unittest.test.testmock' when run from installed Python
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14382>
_______________________________________


More information about the New-bugs-announce mailing list