MCPcopy Index your code
hub / github.com/python/cpython / test_multiple_runs

Method test_multiple_runs

Lib/test/test_compileall.py:650–661  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

648 self.assertEqual(sorted(os.listdir(self.pkgdir)), expected)
649
650 def test_multiple_runs(self):
651 # Bug 8527 reported that multiple calls produced empty
652 # __pycache__/__pycache__ directories.
653 self.assertRunOK('-q', self.pkgdir)
654 # Verify the __pycache__ directory contents.
655 self.assertTrue(os.path.exists(self.pkgdir_cachedir))
656 cachecachedir = os.path.join(self.pkgdir_cachedir, '__pycache__')
657 self.assertFalse(os.path.exists(cachecachedir))
658 # Call compileall again.
659 self.assertRunOK('-q', self.pkgdir)
660 self.assertTrue(os.path.exists(self.pkgdir_cachedir))
661 self.assertFalse(os.path.exists(cachecachedir))
662
663 @without_source_date_epoch # timestamp invalidation test
664 def test_force(self):

Callers

nothing calls this directly

Calls 5

assertRunOKMethod · 0.95
assertTrueMethod · 0.80
assertFalseMethod · 0.80
existsMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected