def testDefaultSdistTxt(self): st = Setuptools(Process(quiet=True)) self.destroy(self.clonedir) # This uses ??? to create the manifest. Note that the .txt file # is missing from the archive. archive = st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip']) self.assertEqual(contains(archive, 'subversion_only.txt'), False)
def testNoneManifest(self): st = Setuptools(Process(quiet=True, env=get_env())) archive = st.run_dist(self.packagedir, [], 'sdist', ['--formats=zip'], ff='none') self.assertEqual(get_manifest(archive), """\ README.txt setup.py testpackage/__init__.py testpackage/git_only.py 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 testSubversionManifest(self): st = Setuptools(Process(quiet=True)) # This uses svn to create the manifest. archive = st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip'], scmtype='svn') self.assertEqual(get_manifest(archive), """\ README.txt setup.py testpackage/__init__.py testpackage/subversion_only.py testpackage/subversion_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 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 testGitManifest(self): st = Setuptools(Process(quiet=True)) self.clone() # This uses git to create the manifest. archive = st.run_dist(self.clonedir, [], "sdist", ["--formats=zip"], scmtype="git") self.assertEqual( get_manifest(archive), """\ README.txt setup.py testpackage/__init__.py 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) # This uses ??? to create the manifest. archive = st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip']) self.assertEqual(contains(archive, 'subversion_only.py'), True)
def testRemoveSetupPyc(self): st = Setuptools(Process(quiet=True, env=get_env())) self.clone() st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip'], scmtype='git') self.failIf(isfile(join(self.clonedir, 'setup.pyc')))
def testGitSdistTxt(self): st = Setuptools(Process(quiet=True, env=get_env())) self.clone() # This uses git to create the manifest. archive = st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip']) self.assertEqual(contains(archive, 'git_only.txt'), True)
def testDefaultSdistC(self): st = Setuptools(Process(quiet=True, env=get_env())) self.destroy(self.clonedir) # Use the default file-finder to create the manifest; .c file is missing. archive = st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip']) self.assertEqual(contains(archive, 'subversion_only.c'), False)
def testRemoveSetupPyc(self): st = Setuptools(Process(quiet=True, env=get_env())) st.run_dist(self.packagedir, [], 'sdist', ['--formats=zip'], ff='none') self.assertFalse(isfile(join(self.packagedir, 'setup.pyc')))
def testManifestSdistC(self): st = Setuptools(Process(quiet=True, env=get_env())) archive = st.run_dist(self.packagedir, [], 'sdist', ['--formats=zip'], ff='none') self.assertEqual(contains(archive, 'git_only.c'), True)
def testInfoFlags(self): st = Setuptools(Process(quiet=True, env=get_env())) archive = st.run_dist(self.packagedir, st.infoflags, 'sdist', ['--formats=zip'], ff='git') self.assertEqual(contains(archive, 'git_only.py'), 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)
def testSubversionMetaFile(self): st = Setuptools(Process(quiet=True)) # This uses svn to create the manifest. archive = st.run_dist(self.clonedir, [], "sdist", ["--formats=zip"], scmtype="svn") self.assertEqual(contains(archive, ".svnignore"), False)
def testSubversionSdistPy(self): st = Setuptools(Process(quiet=True)) # This uses svn to create the manifest. archive = st.run_dist(self.clonedir, [], "sdist", ["--formats=zip"]) self.assertEqual(contains(archive, "subversion_only.py"), True)
def testRemoveSetupPyc(self): st = Setuptools(Process(quiet=True)) self.clone() st.run_dist(self.clonedir, [], "sdist", ["--formats=zip"], scmtype="git") self.failIf(isfile(join(self.clonedir, "setup.pyc")))
def testGitMetaFile(self): st = Setuptools(Process(quiet=True)) self.clone() # This uses git to create the manifest. archive = st.run_dist(self.clonedir, [], "sdist", ["--formats=zip"], scmtype="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 testMercurialSdistPy(self): st = Setuptools(Process(quiet=True)) self.clone() # This uses hg to create the manifest. archive = st.run_dist(self.clonedir, [], "sdist", ["--formats=zip"]) self.assertEqual(contains(archive, "mercurial_only.py"), True)
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 testManifestMetaFile(self): st = Setuptools(Process(quiet=True, env=get_env())) archive = st.run_dist(self.packagedir, [], 'sdist', ['--formats=zip'], ff='none') self.assertEqual(contains(archive, '.gitignore'), False)
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 testSubversionSdistC(self): st = Setuptools(Process(quiet=True, env=get_env())) archive = st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip'], ff='svn') self.assertEqual(contains(archive, 'subversion_only.c'), True)
def get_env(): return Setuptools().get_env()
def testMercurialSdistPy(self): st = Setuptools(Process(quiet=True, env=get_env())) self.clone() # This uses hg to create the manifest. archive = st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip']) self.assertEqual(contains(archive, 'mercurial_only.py'), True)
def testSubversionMetaFile(self): st = Setuptools(Process(quiet=True)) # This uses svn to create the manifest. archive = st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip'], scmtype='svn') self.assertEqual(contains(archive, '.svnignore'), False)
def testGitMetaFile(self): st = Setuptools(Process(quiet=True, env=get_env())) self.clone() # This uses git to create the manifest. archive = st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip'], scmtype='git') self.assertEqual(contains(archive, '.gitignore'), False)
def testSubversionSdistTxt(self): st = Setuptools(Process(quiet=True)) archive = st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip'], ff=self.type) self.assertEqual(contains(archive, 'subversion_only.txt'), True)
def testSubversionSdistTxt(self): st = Setuptools(Process(quiet=True)) # This uses svn to create the manifest. archive = st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip']) self.assertEqual(contains(archive, 'subversion_only.txt'), True)
def testSubversionMetaFile(self): st = Setuptools(Process(quiet=True, env=get_env())) archive = st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip'], ff='svn') self.assertEqual(contains(archive, '.svnignore'), False)
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 testGitSdistTxt(self): st = Setuptools(Process(quiet=True)) self.clone() # This uses git to create the manifest. archive = st.run_dist(self.clonedir, [], "sdist", ["--formats=zip"]) self.assertEqual(contains(archive, "git_only.txt"), True)
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 testRemoveSetupPyc(self): st = Setuptools(Process(quiet=True)) st.run_dist(self.clonedir, [], 'sdist', ['--formats=zip'], ff=self.type) self.assertFalse(isfile(join(self.clonedir, 'setup.pyc')))