def f(self, ext=ext, switch=switch):
    script_helper.assert_python_ok(*(switch + ['-m', 'compileall', '-q', self.pkgdir]))
    self.assertTrue(os.path.exists(self.pkgdir_cachedir))
    expected = sorted((base.format(sys.implementation.cache_tag, ext) for base in ('__init__.{}.{}', 'bar.{}.{}')))
    self.assertEqual(sorted(os.listdir(self.pkgdir_cachedir)), expected)
    self.assertFalse([fn for fn in os.listdir(self.pkgdir) if fn.endswith(ext)])
def f(self, ext=ext, switch=switch):
    script_helper.assert_python_ok(*(switch + ['-m', 'compileall', '-q', self.pkgdir]))
    self.assertTrue(os.path.exists(self.pkgdir_cachedir))
    expected = sorted((base.format(sys.implementation.cache_tag, ext) for base in ('__init__.{}.{}', 'bar.{}.{}')))
    self.assertEqual(sorted(os.listdir(self.pkgdir_cachedir)), expected)
    self.assertFalse([fn for fn in os.listdir(self.pkgdir) if fn.endswith(ext)])