示例#1
0
 def test_result(self):
     test = WasRun("testMethod")
     result = test.run()
     assert "1 run, 0 failed" == result.summary()
示例#2
0
 def test_suite(self):
     suite = TestSuite()
     suite.add(WasRun("testMethod"))
     suite.add(WasRun("brokenMethod"))
     result = suite.run()
     assert result.summary() == "2 run, 1 failed"
示例#3
0
 def test_run(self):
     test = WasRun("testMethod")
     test.run()
     assert test.log == "setUp testMethod tearDown "
示例#4
0
 def test_failed_result(self):
     # expected failure
     test = WasRun('broken_method')
     test.run(self.result)
     assert "1 run, 1 failed" == self.result.summary(), "Expected Failure"
示例#5
0
 def test_failed(self):
     test = WasRun("brokenMethod")
     result = test.run()
     assert "1 run, 1 failed" == result.summary()
示例#6
0
 def test_template_method(self):
     test = WasRun('test_method')
     test.run(self.result)
     assert "setUp test_method tearDown " == test.log
示例#7
0
 def test_result(self):
     test = WasRun('test_method')
     test.run(self.result)
     assert "1 run, 0 failed" == self.result.summary()
示例#8
0
	def testSuite(self):
		suite = TestSuite()
		suite.add(WasRun('testMethod'))
		suite.add(WasRun('testBrokenMethod'))
		suite.run(self.result)
		assert('2 run, 1 failed' == self.result.summary())
示例#9
0
	def testFailedResult(self):
		test = WasRun('testBrokenMethod')
		test.run(self.result)
		assert('1 run, 1 failed', self.result.summary)
示例#10
0
	def testFailedResultAlwaysTeardown(self):
		test = WasRun('testBrokenMethod')
		test.run(self.result)
		assert('tearDown' in test.log)
示例#11
0
	def testResult(self):
		test = WasRun('testMethod')
		test.run(self.result)
		assert('1 run, 0 failed' == self.result.summary())
示例#12
0
	def testTemplateMethod(self):
		test = WasRun('testMethod')
		test.run(self.result)
		assert('setup testMethod tearDown ' == test.log)