Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

unittest only run test if other tests passes

class Test(unittest.TestCase):
	def test_if_other_test_passes(self):
      # Add first test here
      self.assertTrue(foo())
      # This test will only run if the first test passes
      self.assertEqual(bar(), 2)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #unittest #run #test #tests #passes
ADD COMMENT
Topic
Name
9+7 =