Merge pull request #1541 from RonnyPfannschmidt/document-1540
Document #1540
This commit is contained in:
		
						commit
						be7a86270c
					
				| 
						 | 
					@ -563,6 +563,29 @@ class TestFunctional:
 | 
				
			||||||
                                if isinstance(v, MarkInfo)])
 | 
					                                if isinstance(v, MarkInfo)])
 | 
				
			||||||
            assert marker_names == set(expected_markers)
 | 
					            assert marker_names == set(expected_markers)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.xfail(reason='callspec2.setmulti misuses keywords')
 | 
				
			||||||
 | 
					    @pytest.mark.issue1540
 | 
				
			||||||
 | 
					    def test_mark_from_parameters(self, testdir):
 | 
				
			||||||
 | 
					        testdir.makepyfile("""
 | 
				
			||||||
 | 
					            import pytest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            pytestmark = pytest.mark.skipif(True, reason='skip all')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # skipifs inside fixture params
 | 
				
			||||||
 | 
					            params = [pytest.mark.skipif(False, reason='dont skip')('parameter')]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            @pytest.fixture(params=params)
 | 
				
			||||||
 | 
					            def parameter(request):
 | 
				
			||||||
 | 
					                return request.param
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            def test_1(parameter):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					        """)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        reprec = testdir.inline_run()
 | 
				
			||||||
 | 
					        reprec.assertoutcome(skipped=1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TestKeywordSelection:
 | 
					class TestKeywordSelection:
 | 
				
			||||||
    def test_select_simple(self, testdir):
 | 
					    def test_select_simple(self, testdir):
 | 
				
			||||||
| 
						 | 
					@ -669,4 +692,3 @@ class TestKeywordSelection:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        assert_test_is_not_selected("__")
 | 
					        assert_test_is_not_selected("__")
 | 
				
			||||||
        assert_test_is_not_selected("()")
 | 
					        assert_test_is_not_selected("()")
 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue