[issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6

STINNER Victor report at bugs.python.org
Mon Jul 10 09:09:31 EDT 2017


STINNER Victor added the comment:

> Victor, try to add importlib.invalidate_caches() inside a loop. Does it cause a failure in a single test_concurrency?

I added a "importlib.invalidate_caches()" call in the "for i in range(10):" loop. With this change, a single run doesn't fail. It doesn't fix the test neither: with -R 3:100, the command still fails.

> Some parts of import machinery are platform depended (see issue30873).

I don't think that this issue30873 or issue30626 is platform dependent.


> I don't have idea what is wrong on Windows.

IMHO it's just that my Windows VM is slow. It's a race condition. If I run "./python -m test -m test_concurrency test_import test_import": the command pass, but when again, it fails. It's pure random :-)

----------

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


More information about the Python-bugs-list mailing list