@@ -759,7 +759,7 @@ def test_pass(): pass
759
759
assert re .search (regex_error , html ) is not None
760
760
761
761
@pytest .mark .parametrize ("colors" , [(["red" ]), (["green" , "blue" ])])
762
- def test_css (self , testdir , colors ):
762
+ def test_css (self , testdir , recwarn , colors ):
763
763
testdir .makepyfile ("def test_pass(): pass" )
764
764
css = {}
765
765
cssargs = []
@@ -770,14 +770,16 @@ def test_css(self, testdir, colors):
770
770
cssargs .extend (["--css" , path ])
771
771
result , html = run (testdir , "report.html" , "--self-contained-html" , * cssargs )
772
772
assert result .ret == 0
773
+ assert len (recwarn ) == 0
773
774
for k , v in css .items ():
774
775
assert str (v ["path" ]) in html
775
776
assert v ["style" ] in html
776
777
777
- def test_css_invalid (self , testdir ):
778
+ def test_css_invalid (self , testdir , recwarn ):
778
779
testdir .makepyfile ("def test_pass(): pass" )
779
780
result = testdir .runpytest ("--html" , "report.html" , "--css" , "style.css" )
780
781
assert result .ret
782
+ assert len (recwarn ) == 0
781
783
assert "No such file or directory: 'style.css'" in result .stderr .str ()
782
784
783
785
def test_css_invalid_no_html (self , testdir ):
0 commit comments