Ejemplo n.º 1
0
 def test_result(self):
     test = WasRun("testMethod")
     result = test.run()
     assert "1 run, 0 failed" == result.summary()
Ejemplo n.º 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"
Ejemplo n.º 3
0
 def test_run(self):
     test = WasRun("testMethod")
     test.run()
     assert test.log == "setUp testMethod tearDown "
Ejemplo n.º 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"
Ejemplo n.º 5
0
 def test_failed(self):
     test = WasRun("brokenMethod")
     result = test.run()
     assert "1 run, 1 failed" == result.summary()
Ejemplo n.º 6
0
 def test_template_method(self):
     test = WasRun('test_method')
     test.run(self.result)
     assert "setUp test_method tearDown " == test.log
Ejemplo n.º 7
0
 def test_result(self):
     test = WasRun('test_method')
     test.run(self.result)
     assert "1 run, 0 failed" == self.result.summary()
Ejemplo n.º 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())
Ejemplo n.º 9
0
	def testFailedResult(self):
		test = WasRun('testBrokenMethod')
		test.run(self.result)
		assert('1 run, 1 failed', self.result.summary)
Ejemplo n.º 10
0
	def testFailedResultAlwaysTeardown(self):
		test = WasRun('testBrokenMethod')
		test.run(self.result)
		assert('tearDown' in test.log)
Ejemplo n.º 11
0
	def testResult(self):
		test = WasRun('testMethod')
		test.run(self.result)
		assert('1 run, 0 failed' == self.result.summary())
Ejemplo n.º 12
0
	def testTemplateMethod(self):
		test = WasRun('testMethod')
		test.run(self.result)
		assert('setup testMethod tearDown ' == test.log)