Exemplo n.º 1
0
 def test_skip_at_module_scope(self, testdir):
     col = testdir.getmodulecol("""
         import py
         py.test.skip("hello")
         def test_func():
             pass
     """)
     rep = runner.pytest_make_collect_report(col)
     assert not rep.failed 
     assert not rep.passed 
     assert rep.skipped 
Exemplo n.º 2
0
 def test_skip_at_module_scope(self, testdir):
     col = testdir.getmodulecol("""
         import py
         py.test.skip("hello")
         def test_func():
             pass
     """)
     rep = runner.pytest_make_collect_report(col)
     assert not rep.failed
     assert not rep.passed
     assert rep.skipped
Exemplo n.º 3
0
 def test_collect_result(self, testdir):
     col = testdir.getmodulecol("""
         def test_func1():
             pass
         class TestClass:
             pass
     """)
     rep = runner.pytest_make_collect_report(col)
     assert not rep.failed
     assert not rep.skipped
     assert rep.passed 
     res = rep.result 
     assert len(res) == 2
     assert res[0].name == "test_func1" 
     assert res[1].name == "TestClass" 
Exemplo n.º 4
0
 def test_collect_result(self, testdir):
     col = testdir.getmodulecol("""
         def test_func1():
             pass
         class TestClass:
             pass
     """)
     rep = runner.pytest_make_collect_report(col)
     assert not rep.failed
     assert not rep.skipped
     assert rep.passed
     res = rep.result
     assert len(res) == 2
     assert res[0].name == "test_func1"
     assert res[1].name == "TestClass"