def test_recursion_control(self):
    subpackage = os.path.join(self.pkgdir, 'spam')
    os.mkdir(subpackage)
    subinitfn = script_helper.make_script(subpackage, '__init__', '')
    hamfn = script_helper.make_script(subpackage, 'ham', '')
    self.assertRunOK('-q', '-l', self.pkgdir)
    self.assertNotCompiled(subinitfn)
    self.assertFalse(os.path.exists(os.path.join(subpackage, '__pycache__')))
    self.assertRunOK('-q', self.pkgdir)
    self.assertCompiled(subinitfn)
    self.assertCompiled(hamfn)
def test_recursion_control(self):
    subpackage = os.path.join(self.pkgdir, 'spam')
    os.mkdir(subpackage)
    subinitfn = script_helper.make_script(subpackage, '__init__', )
    hamfn = script_helper.make_script(subpackage, 'ham', )
    self.assertRunOK('-q', '-l', self.pkgdir)
    self.assertNotCompiled(subinitfn)
    self.assertFalse(os.path.exists(os.path.join(subpackage, '__pycache__')))
    self.assertRunOK('-q', self.pkgdir)
    self.assertCompiled(subinitfn)
    self.assertCompiled(hamfn)