[New-bugs-announce] [issue15912] Intermittent import failure
Jean-Paul Calderone
report at bugs.python.org
Mon Sep 10 21:48:08 CEST 2012
New submission from Jean-Paul Calderone:
The attached unit test fails with an ImportError... sometimes. Here's a little blob of shell that seems to make the failure come up more quickly:
while ~/Projects/cpython/3.3/python -m unittest -v test_broken_import; do
rm -rf test_broken_import;
rm -rf __pycache__/;
done
An example of the output when I run it:
exarkun at top:/tmp$ while ~/Projects/cpython/3.3/python -m unittest -v test_broken_import_minimal; do rm -rf test_broken_import; rm -rf __pycache__/; done
test_renamedSource (test_broken_import_minimal.BrokenTests) ... ok
----------------------------------------------------------------------
Ran 1 test in 0.004s
OK
test_renamedSource (test_broken_import_minimal.BrokenTests) ... ok
----------------------------------------------------------------------
Ran 1 test in 0.005s
OK
test_renamedSource (test_broken_import_minimal.BrokenTests) ... > /tmp/test_broken_import_minimal.py(53)test_renamedSource()
-> print(e)
(Pdb) c
No module named 'twisted_renamed_helper'
ERROR
======================================================================
ERROR: test_renamedSource (test_broken_import_minimal.BrokenTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_broken_import_minimal.py", line 50, in test_renamedSource
from twisted_renamed_helper import module
ImportError: No module named 'twisted_renamed_helper'
----------------------------------------------------------------------
Ran 1 test in 0.759s
FAILED (errors=1)
----------
components: Interpreter Core
files: test_broken_import_minimal.py
messages: 170225
nosy: exarkun
priority: normal
severity: normal
status: open
title: Intermittent import failure
versions: Python 3.3
Added file: http://bugs.python.org/file27168/test_broken_import_minimal.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15912>
_______________________________________
More information about the New-bugs-announce
mailing list