invoking test case with in another test case in pytest framework
问题 I am using pytest for automation. Is there any option in pytest to invoking test case with in another test case. 回答1: Sure you can. With pytest, a test case is a simple function or method. For example: def test_foo(): assert 2 + 2 == 4 def test_bar(): assert [1] + [2] == [1, 2] test_foo() Consider why you would want to do this. Typically, keeping tests decoupled provides benefits, like easier debugging when a test fails. 来源: https://stackoverflow.com/questions/45210365/invoking-test-case-with