r46896 - merge forward # Conflicts:
hawkowl-TA+aISz0psMTMxyoc4vAAJOcrHinNvQL0E9HWUfgJXw@public.gmane.org
| Newsgroups | gmane.comp.python.twisted.commits |
|---|---|
| Message-ID | <[email protected]> |
Author: hawkowl
Date: Thu Mar 3 09:39:23 2016
New Revision: 46896
Added:
branches/sdist-use-7985-3/MANIFEST.in
Removed:
branches/sdist-use-7985-3/bin/admin/build-tarballs
Modified:
branches/sdist-use-7985-3/setup.py
branches/sdist-use-7985-3/setup3.py
branches/sdist-use-7985-3/twisted/python/_release.py
branches/sdist-use-7985-3/twisted/python/dist.py
branches/sdist-use-7985-3/twisted/python/dist3.py
branches/sdist-use-7985-3/twisted/python/test/test_dist3.py
branches/sdist-use-7985-3/twisted/python/test/test_release.py
Log:
merge forward # Conflicts:
Modified: branches/sdist-use-7985-3/setup.py
==============================================================================
--- branches/sdist-use-7985-3/setup.py (original)
+++ branches/sdist-use-7985-3/setup.py Thu Mar 3 09:39:23 2016
@@ -52,8 +52,9 @@
packages=getPackages('twisted'),
conditionalExtensions=getExtensions(),
scripts=scripts,
+ include_package_data=True,
+ data_files=getDataFiles("twisted"),
extras_require=_EXTRAS_REQUIRE,
- data_files=getDataFiles('twisted'),
**STATIC_PACKAGE_METADATA))
setup(**setup_args)
Modified: branches/sdist-use-7985-3/setup3.py
==============================================================================
--- branches/sdist-use-7985-3/setup3.py (original)
+++ branches/sdist-use-7985-3/setup3.py Thu Mar 3 09:39:23 2016
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3.3
+#!/usr/bin/env python3
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
@@ -33,16 +33,15 @@
if os.path.exists('twisted'):
sys.path.insert(0, '.')
- from twisted.python.dist3 import modulesToInstall
- from twisted.python.dist3 import testDataFiles, _processDataFileList
+ from twisted.python.dist3 import modulesToInstall, testDataFiles
from twisted.python.dist import STATIC_PACKAGE_METADATA, getDataFiles
- _dataFiles = _processDataFileList(testDataFiles)
args = STATIC_PACKAGE_METADATA.copy()
args['install_requires'] = ["zope.interface >= 4.0.2"]
- args['py_modules'] = modulesToInstall
- args['data_files'] = getDataFiles('twisted') + _dataFiles
+ args['py_modules'] = modulesToInstall + testDataFiles
args['zip_safe'] = False
+ args['include_package_data'] = True
+ args['data_files'] = getDataFiles("twisted")
args['cmdclass'] = {'sdist': DisabledSdist}
args['scripts'] = ['bin/trial', 'bin/twistd']
Modified: branches/sdist-use-7985-3/twisted/python/_release.py
==============================================================================
--- branches/sdist-use-7985-3/twisted/python/_release.py (original)
+++ branches/sdist-use-7985-3/twisted/python/_release.py Thu Mar 3 09:39:23 2016
@@ -15,13 +15,11 @@
import os
import re
import sys
-import tarfile
import textwrap
from zope.interface import Interface, implementer
from datetime import date
-from tempfile import mkdtemp
from subprocess import PIPE, STDOUT, Popen
from twisted.python.versions import Version
@@ -1029,93 +1027,6 @@
-class DistributionBuilder(object):
- """
- A builder of Twisted distributions.
-
- This knows how to build tarballs for Twisted.
- """
-
- def __init__(self, rootDirectory, outputDirectory, templatePath=None):
- """
- Create a distribution builder.
-
- @param rootDirectory: root of a Twisted export which will populate
- subsequent tarballs.
- @type rootDirectory: L{FilePath}.
-
- @param outputDirectory: The directory in which to create the tarballs.
- @type outputDirectory: L{FilePath}
-
- @param templatePath: Path to the template file that is used for the
- howto documentation.
- @type templatePath: L{FilePath}
- """
- self.rootDirectory = rootDirectory
- self.outputDirectory = outputDirectory
- self.templatePath = templatePath
-
-
- def buildTwisted(self, version):
- """
- Build the main Twisted distribution in C{Twisted-<version>.tar.bz2}.
-
- bin/admin is excluded.
-
- @type version: C{str}
- @param version: The version of Twisted to build.
-
- @return: The tarball file.
- @rtype: L{FilePath}.
- """
- releaseName = "Twisted-%s" % (version,)
- buildPath = lambda *args: '/'.join((releaseName,) + args)
-
- outputFile = self.outputDirectory.child(releaseName + ".tar.bz2")
- tarball = tarfile.TarFile.open(outputFile.path, 'w:bz2')
-
- docPath = self.rootDirectory.child("docs")
-
- # Generate docs!
- if docPath.isdir():
- SphinxBuilder().build(docPath)
-
- for binthing in self.rootDirectory.child("bin").children():
- # bin/admin should not be included.
- if binthing.basename() != "admin":
- tarball.add(binthing.path,
- buildPath("bin", binthing.basename()))
-
- for submodule in self.rootDirectory.child("twisted").children():
- if submodule.basename() == "plugins":
- for plugin in submodule.children():
- tarball.add(plugin.path, buildPath("twisted", "plugins",
- plugin.basename()))
- else:
- tarball.add(submodule.path, buildPath("twisted",
- submodule.basename()))
-
- for docDir in self.rootDirectory.child("doc").children():
- if docDir.basename() != "historic":
- tarball.add(docDir.path, buildPath("doc", docDir.basename()))
-
- for toplevel in self.rootDirectory.children():
- if not toplevel.isdir():
- tarball.add(toplevel.path, buildPath(toplevel.basename()))
-
- tarball.close()
-
- return outputFile
-
-
-
-class UncleanWorkingDirectory(Exception):
- """
- Raised when the working directory of a repository is unclean.
- """
-
-
-
class NotWorkingDirectory(Exception):
"""
Raised when a directory does not appear to be a repository directory of a
@@ -1124,50 +1035,6 @@
-def buildAllTarballs(checkout, destination, templatePath=None):
- """
- Build the complete tarball (including documentation) for Twisted.
-
- This should be called after the version numbers have been updated and
- NEWS files created.
-
- @type checkout: L{FilePath}
- @param checkout: The repository from which a pristine source tree will be
- exported.
- @type destination: L{FilePath}
- @param destination: The directory in which tarballs will be placed.
- @type templatePath: L{FilePath}
- @param templatePath: Location of the template file that is used for the
- howto documentation.
-
- @raise UncleanWorkingDirectory: If there are modifications to the
- working directory of C{checkout}.
- @raise NotWorkingDirectory: If the C{checkout} path is not a supported VCS
- repository.
- """
- cmd = getRepositoryCommand(checkout)
- cmd.ensureIsWorkingDirectory(checkout)
-
- if not cmd.isStatusClean(checkout):
- raise UncleanWorkingDirectory(
- "There are local modifications to the repository in %s."
- % (checkout.path,))
-
- workPath = FilePath(mkdtemp())
- export = workPath.child("export")
- cmd.exportTo(checkout, export)
- twistedPath = export.child("twisted")
- version = Project(twistedPath).getVersion()
- versionString = version.base()
-
- if not destination.exists():
- destination.createDirectory()
- db = DistributionBuilder(export, destination, templatePath=templatePath)
- db.buildTwisted(versionString)
- workPath.remove()
-
-
-
class ChangeVersionsScriptOptions(Options):
"""
Options for L{ChangeVersionsScript}.
@@ -1204,36 +1071,6 @@
-class BuildTarballsScript(object):
- """
- A thing for building release tarballs. See L{main}.
- """
- buildAllTarballs = staticmethod(buildAllTarballs)
-
- def main(self, args):
- """
- Build all release tarballs.
-
- @type args: list of C{str}
- @param args: The command line arguments to process. This must contain
- at least two strings: the checkout directory and the destination
- directory. An optional third string can be specified for the
- website template file, used for building the howto documentation.
- If this string isn't specified, the default template included in
- twisted will be used.
- """
- if len(args) < 2 or len(args) > 3:
- sys.exit("Must specify at least two arguments: "
- "Twisted checkout and destination path. The optional "
- "third argument is the website template path.")
- if len(args) == 2:
- self.buildAllTarballs(FilePath(args[0]), FilePath(args[1]))
- elif len(args) == 3:
- self.buildAllTarballs(FilePath(args[0]), FilePath(args[1]),
- FilePath(args[2]))
-
-
-
class BuildAPIDocsScript(object):
"""
A thing for building API documentation. See L{main}.
Modified: branches/sdist-use-7985-3/twisted/python/dist.py
==============================================================================
--- branches/sdist-use-7985-3/twisted/python/dist.py (original)
+++ branches/sdist-use-7985-3/twisted/python/dist.py Thu Mar 3 09:39:23 2016
@@ -28,8 +28,9 @@
from distutils.command import build_scripts, install_data, build_ext
from distutils.errors import CompileError
-from distutils import core
from distutils.core import Extension
+from setuptools import setup as _setup
+
import fnmatch
import os
import platform
@@ -129,7 +130,7 @@
@param conditionalExtensions: Extensions to optionally build.
@type conditionalExtensions: C{list} of L{ConditionalExtension}
"""
- return core.setup(**get_setup_args(**kw))
+ return _setup(**get_setup_args(**kw))
def get_setup_args(**kw):
@@ -183,7 +184,8 @@
# Names that are excluded from globbing results:
EXCLUDE_NAMES = ["{arch}", "CVS", ".cvsignore", "_darcs",
"RCS", "SCCS", ".svn"]
-EXCLUDE_PATTERNS = ["*.py[cdo]", "*.s[ol]", ".#*", "*~", "*.py"]
+EXCLUDE_PATTERNS = ["*.py[cdo]", "*.s[ol]", ".#*", "*~", "*.py", "*.cache",
+ "*.old"]
def _filterNames(names):
Modified: branches/sdist-use-7985-3/twisted/python/dist3.py
==============================================================================
--- branches/sdist-use-7985-3/twisted/python/dist3.py (original)
+++ branches/sdist-use-7985-3/twisted/python/dist3.py Thu Mar 3 09:39:23 2016
@@ -33,8 +33,6 @@
from __future__ import division
-from os import path
-
modules = [
"twisted",
@@ -494,30 +492,4 @@
"twisted.web.server",
]
-
-def _processDataFileList(dataFiles):
- """
- Turn a list of file names into a format that distutils likes.
-
- For example:
-
- ["foo/bar.py", "baz/spam.py"]
-
- ...is transformed into...
-
- [("foo", ["foo/bar.py"]), ("baz", "baz/spam.py")]
- """
- files = {}
-
- for file in dataFiles:
- pathFragments = file.split(".")
- targetDir = path.sep.join(pathFragments[:-1])
-
- if not files.get(targetDir):
- files[targetDir] = []
- files[targetDir].append(path.sep.join(pathFragments) + ".py")
-
- return list(files.items())
-
-
modulesToInstall = modules + testModules + almostModules
Modified: branches/sdist-use-7985-3/twisted/python/test/test_dist3.py
==============================================================================
--- branches/sdist-use-7985-3/twisted/python/test/test_dist3.py (original)
+++ branches/sdist-use-7985-3/twisted/python/test/test_dist3.py Thu Mar 3 09:39:23 2016
@@ -11,8 +11,7 @@
import twisted
from twisted.trial.unittest import TestCase
-from twisted.python.dist3 import modulesToInstall
-from twisted.python.dist3 import testDataFiles, _processDataFileList
+from twisted.python.dist3 import modulesToInstall, testDataFiles
class ModulesToInstallTests(TestCase):
@@ -51,20 +50,3 @@
for file in testDataFiles:
self.assertTrue(os.path.exists(
os.path.join(root, os.path.sep.join(file.split(".")) + ".py")))
-
-
- def test_processDataFileList(self):
- """
- L{_processDataFileList} translates a list of files into a distutils
- friendly format.
- """
- result = _processDataFileList(["foo.bar", "foo.baz.bar",
- "foo.z", "baz.spam"])
- self.assertIn(("foo", [os.path.sep.join(["foo", "bar.py"]),
- os.path.sep.join(["foo", "z.py"])]),
- result)
- self.assertIn((os.path.sep.join(["foo", "baz"]),
- [os.path.sep.join(["foo", "baz", "bar.py"])]),
- result)
- self.assertIn(("baz", [os.path.sep.join(["baz", "spam.py"])]),
- result)
Modified: branches/sdist-use-7985-3/twisted/python/test/test_release.py
==============================================================================
--- branches/sdist-use-7985-3/twisted/python/test/test_release.py (original)
+++ branches/sdist-use-7985-3/twisted/python/test/test_release.py Thu Mar 3 09:39:23 2016
@@ -15,7 +15,6 @@
import textwrap
import tempfile
import shutil
-import tarfile
from datetime import date
from io import BytesIO as StringIO
@@ -32,9 +31,9 @@
_changeVersionInFile, getNextVersion, findTwistedProjects, replaceInFile,
replaceProjectVersion, Project, generateVersionFileData,
changeAllProjectVersions, VERSION_OFFSET, filePathDelta, CommandFailed,
- DistributionBuilder, APIBuilder, BuildAPIDocsScript, buildAllTarballs,
- runCommand, UncleanWorkingDirectory, NotWorkingDirectory,
- ChangeVersionsScript, BuildTarballsScript, NewsBuilder, SphinxBuilder,
+ APIBuilder, BuildAPIDocsScript,
+ runCommand, NotWorkingDirectory,
+ ChangeVersionsScript, NewsBuilder, SphinxBuilder,
GitCommand, SVNCommand, getRepositoryCommand, IVCSCommand)
if os.name != 'posix':
@@ -186,24 +185,6 @@
% (root.path, children))
- def assertExtractedStructure(self, outputFile, dirDict):
- """
- Assert that a tarfile content is equivalent to one described by a dict.
-
- @param outputFile: The tar file built by L{DistributionBuilder}.
- @type outputFile: L{FilePath}.
- @param dirDict: The dict that should describe the contents of the
- directory. It should be the same structure as the C{dirDict}
- parameter to L{createStructure}.
- @type dirDict: C{dict}
- """
- tarFile = tarfile.TarFile.open(outputFile.path, "r:bz2")
- extracted = FilePath(self.mktemp())
- for info in tarFile:
- tarFile.extract(info, path=extracted.path)
- self.assertStructure(extracted.children()[0], dirDict)
-
-
class ChangeVersionTests(ExternalTempdirTestCase, StructureAssertingMixin):
"""
@@ -1517,283 +1498,6 @@
-class DistributionBuilderTestBase(StructureAssertingMixin,
- ExternalTempdirTestCase):
- """
- Base for tests of L{DistributionBuilder}.
- """
-
- def setUp(self):
- self.rootDir = FilePath(self.mktemp())
- self.outputDir = FilePath(self.mktemp())
- self.builder = DistributionBuilder(self.rootDir, self.outputDir)
-
-
-
-class DistributionBuilderTests(DistributionBuilderTestBase):
-
- def test_twistedDistribution(self):
- """
- The Twisted tarball contains everything in the source checkout, with
- built documentation.
- """
- manInput1 = "pretend there's some troff in here or something"
- structure = {
- "README.rst": "Twisted",
- "unrelated": "x",
- "LICENSE": "copyright!",
- "setup.py": "import toplevel",
- "bin": {"web": {"websetroot": "SET ROOT"},
- "twistd": "TWISTD"},
- "twisted": {
- "web": {
- "__init__.py": "import WEB",
- "topfiles": {"setup.py": "import WEBINSTALL",
- "README": "WEB!"}},
- "words": {"__init__.py": "import WORDS"},
- "plugins": {"twisted_web.py": "import WEBPLUG",
- "twisted_words.py": "import WORDPLUG"}},
- "docs": {
- "conf.py": testingSphinxConf,
- "index.rst": "",
- "core": {"man": {"twistd.1": manInput1}}
- }
- }
-
- def hasManpagesAndSphinx(path):
- self.assertTrue(path.isdir())
- self.assertEqual(
- path.child("core").child("man").child("twistd.1").getContent(),
- manInput1
- )
- return True
-
- outStructure = {
- "README.rst": "Twisted",
- "unrelated": "x",
- "LICENSE": "copyright!",
- "setup.py": "import toplevel",
- "bin": {"web": {"websetroot": "SET ROOT"},
- "twistd": "TWISTD"},
- "twisted": {
- "web": {"__init__.py": "import WEB",
- "topfiles": {"setup.py": "import WEBINSTALL",
- "README": "WEB!"}},
- "words": {"__init__.py": "import WORDS"},
- "plugins": {"twisted_web.py": "import WEBPLUG",
- "twisted_words.py": "import WORDPLUG"}},
- "doc": hasManpagesAndSphinx,
- }
-
- self.createStructure(self.rootDir, structure)
-
- outputFile = self.builder.buildTwisted("10.0.0")
-
- self.assertExtractedStructure(outputFile, outStructure)
-
- test_twistedDistribution.skip = sphinxSkip
-
-
- def test_excluded(self):
- """
- bin/admin and doc/historic are excluded from the Twisted tarball.
- """
- structure = {
- "bin": {"admin": {"blah": "ADMIN"},
- "twistd": "TWISTD"},
- "twisted": {
- "web": {
- "__init__.py": "import WEB",
- "topfiles": {"setup.py": "import WEBINSTALL",
- "README": "WEB!"}}},
- "doc": {"historic": {"hello": "there"},
- "other": "contents"}}
-
- outStructure = {
- "bin": {"twistd": "TWISTD"},
- "twisted": {
- "web": {
- "__init__.py": "import WEB",
- "topfiles": {"setup.py": "import WEBINSTALL",
- "README": "WEB!"}}},
- "doc": {"other": "contents"}}
-
- self.createStructure(self.rootDir, structure)
- outputFile = self.builder.buildTwisted("10.0.0")
- self.assertExtractedStructure(outputFile, outStructure)
-
-
- def test_setup3(self):
- """
- setup3.py is included in the release tarball.
- """
- structure = {
- "setup3.py": "install python 3 version",
- "bin": {"twistd": "TWISTD"},
- "twisted": {
- "web": {
- "__init__.py": "import WEB",
- "topfiles": {"setup.py": "import WEBINSTALL",
- "README": "WEB!"}}},
- "doc": {"web": {"howto": {"index.html": "hello"}}},
- }
-
- self.createStructure(self.rootDir, structure)
- outputFile = self.builder.buildTwisted("13.2.0")
- self.assertExtractedStructure(outputFile, structure)
-
-
-
-class BuildAllTarballsTestBase(object):
- """
- Tests for L{DistributionBuilder.buildAllTarballs}.
- """
-
- def test_buildAllTarballs(self):
- """
- L{buildAllTarballs} builds tarballs for Twisted and all of its
- subprojects based on a Git repository; the resulting tarballs contain
- no Git metadata. This involves building documentation, which it will
- build with the correct API documentation reference base URL.
- """
- checkoutPath = self.mktemp()
- checkout = FilePath(checkoutPath)
- self.outputDir.remove()
-
- self._init(checkout)
-
- structure = {
- "README.rst": "Twisted",
- "unrelated": "x",
- "LICENSE": "copyright!",
- "setup.py": "import toplevel",
- "bin": {"words": {"im": "import im"},
- "twistd": "TWISTD"},
- "twisted": {
- "topfiles": {"setup.py": "import TOPINSTALL",
- "README": "CORE!"},
- "_version.py": genVersion("twisted", 1, 2, 0),
- "words": {"__init__.py": "import WORDS",
- "_version.py": genVersion("twisted.words", 1, 2, 0),
- "topfiles": {"setup.py": "import WORDSINSTALL",
- "README": "WORDS!"}},
- "plugins": {"twisted_web.py": "import WEBPLUG",
- "twisted_words.py": "import WORDPLUG",
- "twisted_yay.py": "import YAY"}},
- "docs": {
- "conf.py": testingSphinxConf,
- "index.rst": "",
- }
- }
-
- def smellsLikeSphinxOutput(actual):
- self.assertTrue(actual.isdir())
- self.assertIn("index.html", actual.listdir())
- self.assertIn("objects.inv", actual.listdir())
- return True
-
- twistedStructure = {
- "README.rst": "Twisted",
- "unrelated": "x",
- "LICENSE": "copyright!",
- "setup.py": "import toplevel",
- "bin": {"twistd": "TWISTD",
- "words": {"im": "import im"}},
- "twisted": {
- "topfiles": {"setup.py": "import TOPINSTALL",
- "README": "CORE!"},
- "_version.py": genVersion("twisted", 1, 2, 0),
- "words": {"__init__.py": "import WORDS",
- "_version.py": genVersion("twisted.words", 1, 2, 0),
- "topfiles": {"setup.py": "import WORDSINSTALL",
- "README": "WORDS!"}},
- "plugins": {"twisted_web.py": "import WEBPLUG",
- "twisted_words.py": "import WORDPLUG",
- "twisted_yay.py": "import YAY"}},
- "doc": smellsLikeSphinxOutput}
-
- self.createStructure(checkout, structure)
- childs = [x.path for x in checkout.children()]
- self._addAndCommit(checkout, childs)
-
- buildAllTarballs(checkout, self.outputDir)
- self.assertEqual(
- set(self.outputDir.children()),
- set([self.outputDir.child("Twisted-1.2.0.tar.bz2")]))
-
- self.assertExtractedStructure(
- self.outputDir.child("Twisted-1.2.0.tar.bz2"),
- twistedStructure)
-
-
- def test_buildAllTarballsEnsuresCleanCheckout(self):
- """
- L{UncleanWorkingDirectory} is raised by L{buildAllTarballs} when the
- Git repository provided has uncommitted changes.
- """
- checkoutPath = self.mktemp()
- checkout = FilePath(checkoutPath)
-
- self._init(checkout)
-
- checkout.child("foo").setContent("whatever")
- self.assertRaises(UncleanWorkingDirectory,
- buildAllTarballs, checkout, FilePath(self.mktemp()))
-
-
- def test_buildAllTarballsEnsuresExistingCheckout(self):
- """
- L{NotWorkingDirectory} is raised by L{buildAllTarballs} when the
- checkout passed does not exist or is not a Git repository.
- """
- checkout = FilePath(self.mktemp()).child("test")
- self.assertRaises(NotWorkingDirectory,
- buildAllTarballs,
- checkout, FilePath(self.mktemp()))
- checkout.createDirectory()
- self.assertRaises(NotWorkingDirectory,
- buildAllTarballs,
- checkout, FilePath(self.mktemp()))
-
-
-
-class BuildAllTarballsGitTestCase(DistributionBuilderTestBase,
- BuildAllTarballsTestBase):
- """
- Tests for L{DistributionBuilder.buildAllTarballs} using Git.
- """
- skip = gitSkip or sphinxSkip
-
- def _init(self, directory):
- _gitInit(directory)
-
- def _addAndCommit(self, checkout, files):
- runCommand(["git", "-C", checkout.path, "add", "-f"] + files)
- runCommand(["git", "-C", checkout.path, "commit", "-m", "yay"])
-
-
-
-class BuildAllTarballsSVNTestCase(DistributionBuilderTestBase,
- BuildAllTarballsTestBase):
- """
- Tests for L{DistributionBuilder.buildAllTarballs} using SVN.
- """
- skip = svnSkip or sphinxSkip
-
- def _init(self, directory):
- repositoryPath = self.mktemp()
- repository = FilePath(repositoryPath)
-
- runCommand(["svnadmin", "create", repository.path])
- runCommand(["svn", "checkout", "file://" + repository.path,
- directory.path])
-
- def _addAndCommit(self, checkout, files):
- runCommand(["svn", "add"] + files)
- runCommand(["svn", "commit", checkout.path, "-m", "yay"])
-
-
-
class ScriptTests(StructureAssertingMixin, ExternalTempdirTestCase):
"""
Tests for the release script functionality.
@@ -1884,52 +1588,6 @@
["my united.states.of prewhatever"])
- def test_buildTarballsScript(self):
- """
- L{BuildTarballsScript.main} invokes L{buildAllTarballs} with
- 2 or 3 L{FilePath} instances representing the paths passed to it.
- """
- builds = []
-
- def myBuilder(checkout, destination, template=None):
- builds.append((checkout, destination, template))
-
- tarballBuilder = BuildTarballsScript()
- tarballBuilder.buildAllTarballs = myBuilder
-
- tarballBuilder.main(["checkoutDir", "destinationDir"])
- self.assertEqual(
- builds,
- [(FilePath("checkoutDir"), FilePath("destinationDir"), None)])
-
- builds = []
- tarballBuilder.main(["checkoutDir", "destinationDir", "templatePath"])
- self.assertEqual(
- builds,
- [(FilePath("checkoutDir"), FilePath("destinationDir"),
- FilePath("templatePath"))])
-
-
- def test_defaultBuildTarballsScriptBuilder(self):
- """
- The default implementation of L{BuildTarballsScript.buildAllTarballs}
- is L{buildAllTarballs}.
- """
- tarballBuilder = BuildTarballsScript()
- self.assertEqual(tarballBuilder.buildAllTarballs, buildAllTarballs)
-
-
- def test_badNumberOfArgumentsToBuildTarballs(self):
- """
- L{BuildTarballsScript.main} raises SystemExit when the wrong number of
- arguments are passed.
- """
- tarballBuilder = BuildTarballsScript()
- self.assertRaises(SystemExit, tarballBuilder.main, [])
- self.assertRaises(SystemExit, tarballBuilder.main,
- ["a", "b", "c", "d"])
-
-
def test_badNumberOfArgumentsToBuildNews(self):
"""
L{NewsBuilder.main} raises L{SystemExit} when other than 1 argument is