mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Try to debug sporadic test failures
This commit is contained in:
parent
b43fde98b4
commit
abe72d7eb3
1 changed files with 5 additions and 2 deletions
|
|
@ -325,12 +325,15 @@ def cleanup():
|
|||
self.addCleanup(cleanup)
|
||||
# Touch the __init__.py file.
|
||||
support.create_empty_file('pep3147/__init__.py')
|
||||
expected___file__ = os.sep.join(('.', 'pep3147', '__init__.py'))
|
||||
m = __import__('pep3147')
|
||||
self.assertEqual(m.__file__, expected___file__, (m.__file__, m.__path__))
|
||||
# Ensure we load the pyc file.
|
||||
support.forget('pep3147')
|
||||
m = __import__('pep3147')
|
||||
self.assertEqual(m.__file__,
|
||||
os.sep.join(('.', 'pep3147', '__init__.py')))
|
||||
support.forget('pep3147')
|
||||
sys.stdout.flush()
|
||||
self.assertEqual(m.__file__, expected___file__, (m.__file__, m.__path__))
|
||||
|
||||
|
||||
class NullImporterTests(unittest.TestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue