diff options
Diffstat (limited to 'lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/test/util/sourcesteps.py')
-rw-r--r-- | lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/test/util/sourcesteps.py | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/test/util/sourcesteps.py b/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/test/util/sourcesteps.py deleted file mode 100644 index df1b931b..00000000 --- a/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/test/util/sourcesteps.py +++ /dev/null @@ -1,61 +0,0 @@ -# This file is part of Buildbot. Buildbot is free software: you can -# redistribute it and/or modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation, version 2. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 51 -# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Copyright Buildbot Team Members - -import mock -from buildbot.test.util import steps - -import os - -class SourceStepMixin(steps.BuildStepMixin): - """ - Support for testing source steps. Aside from the capabilities of - L{BuildStepMixin}, this adds: - - - fake sourcestamps - - The following instance variables are available after C{setupSourceStep}, in - addition to those made available by L{BuildStepMixin}: - - @ivar sourcestamp: fake SourceStamp for the build - """ - - def setUpSourceStep(self): - return steps.BuildStepMixin.setUpBuildStep(self) - - def tearDownSourceStep(self): - return steps.BuildStepMixin.tearDownBuildStep(self) - - # utilities - - def setupStep(self, step, args={}, patch=None, **kwargs): - """ - Set up C{step} for testing. This calls L{BuildStepMixin}'s C{setupStep} - and then does setup specific to a Source step. - """ - step = steps.BuildStepMixin.setupStep(self, step, **kwargs) - - ss = self.sourcestamp = mock.Mock(name="sourcestamp") - ss.ssid = 9123 - ss.branch = args.get('branch', None) - ss.revision = args.get('revision', None) - ss.project = '' - ss.repository = '' - ss.patch = patch - ss.patch_info = None - ss.changes = [] - self.build.path_module = os.path - self.build.getSourceStamp = lambda x=None: ss - return step - |