shorten some test code
This commit is contained in:
		
							parent
							
								
									596937e610
								
							
						
					
					
						commit
						f0bfe9de3d
					
				| 
						 | 
					@ -215,8 +215,8 @@ class TestGeneralUsage(object):
 | 
				
			||||||
        assert not result.ret
 | 
					        assert not result.ret
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_issue109_sibling_conftests_not_loaded(self, testdir):
 | 
					    def test_issue109_sibling_conftests_not_loaded(self, testdir):
 | 
				
			||||||
        sub1 = testdir.tmpdir.mkdir("sub1")
 | 
					        sub1 = testdir.mkdir("sub1")
 | 
				
			||||||
        sub2 = testdir.tmpdir.mkdir("sub2")
 | 
					        sub2 = testdir.mkdir("sub2")
 | 
				
			||||||
        sub1.join("conftest.py").write("assert 0")
 | 
					        sub1.join("conftest.py").write("assert 0")
 | 
				
			||||||
        result = testdir.runpytest(sub2)
 | 
					        result = testdir.runpytest(sub2)
 | 
				
			||||||
        assert result.ret == EXIT_NOTESTSCOLLECTED
 | 
					        assert result.ret == EXIT_NOTESTSCOLLECTED
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -84,7 +84,7 @@ def test_conftest_in_nonpkg_with_init(tmpdir):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def test_doubledash_considered(testdir):
 | 
					def test_doubledash_considered(testdir):
 | 
				
			||||||
    conf = testdir.mkdir("--option")
 | 
					    conf = testdir.mkdir("--option")
 | 
				
			||||||
    conf.join("conftest.py").ensure()
 | 
					    conf.ensure("conftest.py")
 | 
				
			||||||
    conftest = PytestPluginManager()
 | 
					    conftest = PytestPluginManager()
 | 
				
			||||||
    conftest_setinitial(conftest, [conf.basename, conf.basename])
 | 
					    conftest_setinitial(conftest, [conf.basename, conf.basename])
 | 
				
			||||||
    values = conftest._getconftestmodules(conf)
 | 
					    values = conftest._getconftestmodules(conf)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue