def test_no(self): """ A non-package is identified """ tmpdir = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, tmpdir) self.assertFalse(loader.isPackage(tmpdir))
def test_yes(self): "A package is identified." tmpdir = tempfile.mkdtemp() fh = open(os.path.join(tmpdir, '__init__.py'), 'w') fh.write('pass\n') fh.close() self.assertTrue(loader.isPackage(tmpdir)) shutil.rmtree(tmpdir)
def test_yes(self): """ A package is identified. """ tmpdir = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, tmpdir) fh = open(os.path.join(tmpdir, '__init__.py'), 'w') fh.write('pass\n') fh.close() self.assertTrue(loader.isPackage(tmpdir))
def test_yes(self): """ A package is identified. """ tmpdir = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, tmpdir) fh = open(os.path.join(tmpdir, "__init__.py"), "w") fh.write("pass\n") fh.close() self.assertTrue(loader.isPackage(tmpdir))