def test_failures(self): self.setupStep(maxq.MaxQ(testdir='x')) self.expectCommands( ExpectShell(workdir='wkdir', command="run_maxq.py x") + ExpectShell.log('stdio', stdout='\nTEST FAILURE: foo\n' * 10) + 2) self.expectOutcome(result=FAILURE, state_string='10 maxq failures') return self.runStep()
def test_success(self): self.setupStep(maxq.MaxQ(testdir='x')) self.expectCommands( ExpectShell(workdir='wkdir', command="run_maxq.py x") + ExpectShell.log('stdio', stdout='no failures\n') + 0) self.expectOutcome(result=SUCCESS, state_string='success') return self.runStep()
def test_nonzero_rc_no_failures(self): self.setupStep(maxq.MaxQ(testdir='x')) self.expectCommands( ExpectShell(workdir='wkdir', command="run_maxq.py x") + ExpectShell.log('stdio', stdout='no failures\n') + 2) self.expectOutcome(result=FAILURE, state_string='1 maxq failures') return self.runStep()
def test_failures(self): self.setup_step(maxq.MaxQ(testdir='x')) self.expect_commands( ExpectShell(workdir='wkdir', command=["run_maxq.py", "x"]).stdout( '\nTEST FAILURE: foo\n' * 10).exit(2)) self.expect_outcome(result=FAILURE, state_string='10 maxq failures') return self.run_step()
def test_nonzero_rc_no_failures(self): self.setup_step(maxq.MaxQ(testdir='x')) self.expect_commands( ExpectShell(workdir='wkdir', command=["run_maxq.py", "x"]).stdout('no failures\n').exit(2)) self.expect_outcome(result=FAILURE, state_string='1 maxq failures') return self.run_step()
def test_success(self): self.setup_step(maxq.MaxQ(testdir='x')) self.expect_commands( ExpectShell(workdir='wkdir', command=["run_maxq.py", "x"]).stdout('no failures\n').exit(0)) self.expect_outcome(result=SUCCESS, state_string='success') return self.run_step()
def test_success(self): self.setupStep(maxq.MaxQ(testdir='x')) self.expectCommands( ExpectShell(workdir='wkdir', usePTY='slave-config', command="run_maxq.py x") + ExpectShell.log('stdio', stdout='no failures\n') + 0) self.expectOutcome(result=SUCCESS, status_text=['maxq', 'tests']) return self.runStep()
def test_failures(self): self.setupStep(maxq.MaxQ(testdir='x')) self.expectCommands( ExpectShell(workdir='wkdir', usePTY='slave-config', command="run_maxq.py x") + ExpectShell.log('stdio', stdout='\nTEST FAILURE: foo\n' * 10) + 2) self.expectOutcome(result=FAILURE, status_text=['10', 'maxq', 'failures']) return self.runStep()
def testAllSteps(self): # make sure that steps can be created from the factories that they # return for s in ( dummy.Dummy(), dummy.FailingDummy(), dummy.RemoteDummy(), maxq.MaxQ("testdir"), python.BuildEPYDoc(), python.PyFlakes(), python_twisted.HLint(), python_twisted.Trial(testpath=None, tests="tests"), python_twisted.ProcessDocs(), python_twisted.BuildDebs(), python_twisted.RemovePYCs(), shell.ShellCommand(), shell.TreeSize(), shell.Configure(), shell.Compile(), shell.Test(), source.CVS("cvsroot", "module"), source.SVN("svnurl"), source.Darcs("repourl"), source.Git("repourl"), source.Arch("url", "version"), source.Bazaar("url", "version", "archive"), source.Bzr("repourl"), source.Mercurial("repourl"), source.P4("p4base"), source.P4Sync(1234, "p4user", "passwd", "client", mode="copy"), source.Monotone("server", "branch"), transfer.FileUpload("src", "dest"), transfer.FileDownload("src", "dest"), ): try: self._loop(s) except: print "error checking %s" % s raise
def test_testdir_required(self): with self.assertRaises(config.ConfigErrors): maxq.MaxQ()
def test_testdir_required(self): self.assertRaises(config.ConfigErrors, lambda: maxq.MaxQ())