(self, ext=ext, switch=switch)
| 625 | ('doubleoptimize', 'opt-2.pyc', ['-OO']), |
| 626 | ]: |
| 627 | def f(self, ext=ext, switch=switch): |
| 628 | script_helper.assert_python_ok(*(switch + |
| 629 | ['-m', 'compileall', '-q', self.pkgdir])) |
| 630 | # Verify the __pycache__ directory contents. |
| 631 | self.assertTrue(os.path.exists(self.pkgdir_cachedir)) |
| 632 | expected = sorted(base.format(sys.implementation.cache_tag, ext) |
| 633 | for base in ('__init__.{}.{}', 'bar.{}.{}')) |
| 634 | self.assertEqual(sorted(os.listdir(self.pkgdir_cachedir)), expected) |
| 635 | # Make sure there are no .pyc files in the source directory. |
| 636 | self.assertFalse([fn for fn in os.listdir(self.pkgdir) |
| 637 | if fn.endswith(ext)]) |
| 638 | locals()['test_pep3147_paths_' + name] = f |
| 639 | |
| 640 | def test_legacy_paths(self): |
nothing calls this directly
no test coverage detected