@@ -576,8 +576,9 @@ def test_usedevelop_mixed(initproj, cmd):
576
576
assert "sdist-make" in result .stdout .str ()
577
577
578
578
579
- def test_test_usedevelop (cmd , initproj ):
580
- initproj ("example123-0.5" , filedefs = {
579
+ @pytest .mark .parametrize ("src_root" , ["." , "src" ])
580
+ def test_test_usedevelop (cmd , initproj , src_root ):
581
+ initproj ("example123-0.5" , src_root = src_root , filedefs = {
581
582
'tests' : {
582
583
'test_hello.py' : """
583
584
def test_hello(pytestconfig):
@@ -602,6 +603,7 @@ def test_hello(pytestconfig):
602
603
assert "sdist-make" not in result .stdout .str ()
603
604
result = cmd .run ("tox" , "-epython" , )
604
605
assert not result .ret
606
+ assert "develop-inst-noop" in result .stdout .str ()
605
607
result .stdout .fnmatch_lines ([
606
608
"*1 passed*" ,
607
609
"*summary*" ,
@@ -611,6 +613,7 @@ def test_hello(pytestconfig):
611
613
old = cmd .tmpdir .chdir ()
612
614
result = cmd .run ("tox" , "-c" , "example123/tox.ini" )
613
615
assert not result .ret
616
+ assert "develop-inst-noop" in result .stdout .str ()
614
617
result .stdout .fnmatch_lines ([
615
618
"*1 passed*" ,
616
619
"*summary*" ,
@@ -623,11 +626,18 @@ def test_hello(pytestconfig):
623
626
testfile .write ("def test_fail(): assert 0" )
624
627
result = cmd .run ("tox" , )
625
628
assert result .ret
629
+ assert "develop-inst-noop" in result .stdout .str ()
626
630
result .stdout .fnmatch_lines ([
627
631
"*1 failed*" ,
628
632
"*summary*" ,
629
633
"*python: *failed*" ,
630
634
])
635
+ # test develop is called if setup.py changes
636
+ setup_py = py .path .local ("setup.py" )
637
+ setup_py .write (setup_py .read () + ' ' )
638
+ result = cmd .run ("tox" , )
639
+ assert result .ret
640
+ assert "develop-inst-nodeps" in result .stdout .str ()
631
641
632
642
633
643
def test_alwayscopy (initproj , cmd ):
0 commit comments