def testGitManifest(self): st = Setuptools(Process(quiet=True, env=get_env())) archive = st.run_dist(self.packagedir, [], 'sdist', ['--formats=zip'], ff='git') self.assertEqual( get_manifest(archive), """\ README.txt setup.py testpackage/__init__.py testpackage/git_only.c testpackage/git_only.py testpackage/git_only.txt testpackage.egg-info/PKG-INFO testpackage.egg-info/SOURCES.txt testpackage.egg-info/dependency_links.txt testpackage.egg-info/not-zip-safe testpackage.egg-info/requires.txt testpackage.egg-info/top_level.txt""")
def testDefaultSdistPy(self): st = Setuptools(Process(quiet=True)) self.destroy(self.clonedir) # Use the default file-finder to create the manifest archive = st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip']) self.assertEqual(contains(archive, 'subversion_only.py'), True)
def testSubversionSdistC(self): st = Setuptools(Process(quiet=True)) archive = st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip'], ff=self.type) self.assertEqual(contains(archive, 'subversion_only.c'), True)
def get_env(): return Setuptools().get_env()
def testRemoveSetupPyc(self): st = Setuptools(Process(quiet=True, env=get_env())) st.run_dist(self.packagedir, [], 'sdist', ['--formats=zip'], ff='git') self.failIf(isfile(join(self.packagedir, 'setup.pyc')))
def testGitMetaFile(self): st = Setuptools(Process(quiet=True, env=get_env())) archive = st.run_dist(self.packagedir, [], 'sdist', ['--formats=zip'], ff='git') self.assertEqual(contains(archive, '.gitignore'), False)
def testGitSdistC(self): st = Setuptools(Process(quiet=True, env=get_env())) archive = st.run_dist(self.packagedir, [], 'sdist', ['--formats=zip'], ff='git') self.assertEqual(contains(archive, 'git_only.c'), True)
def testMercurialSdistTxt(self): st = Setuptools(Process(quiet=True, env=get_env())) archive = st.run_dist(self.packagedir, [], 'sdist', ['--formats=zip'], ff='hg') self.assertEqual(contains(archive, 'mercurial_only.txt'), True)
def testRemoveSetupPyc(self): st = Setuptools(Process(quiet=True)) st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip'], ff=self.type) self.failIf(isfile(join(self.clonedir, 'setup.pyc')))
def testSubversionMetaFile(self): st = Setuptools(Process(quiet=True)) archive = st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip'], ff=self.type) self.assertEqual(contains(archive, '.svnignore'), False)