@@ -759,7 +759,7 @@ def test_pass(): pass
759759 assert re .search (regex_error , html ) is not None
760760
761761 @pytest .mark .parametrize ("colors" , [(["red" ]), (["green" , "blue" ])])
762- def test_css (self , testdir , colors ):
762+ def test_css (self , testdir , recwarn , colors ):
763763 testdir .makepyfile ("def test_pass(): pass" )
764764 css = {}
765765 cssargs = []
@@ -770,14 +770,16 @@ def test_css(self, testdir, colors):
770770 cssargs .extend (["--css" , path ])
771771 result , html = run (testdir , "report.html" , "--self-contained-html" , * cssargs )
772772 assert result .ret == 0
773+ assert len (recwarn ) == 0
773774 for k , v in css .items ():
774775 assert str (v ["path" ]) in html
775776 assert v ["style" ] in html
776777
777- def test_css_invalid (self , testdir ):
778+ def test_css_invalid (self , testdir , recwarn ):
778779 testdir .makepyfile ("def test_pass(): pass" )
779780 result = testdir .runpytest ("--html" , "report.html" , "--css" , "style.css" )
780781 assert result .ret
782+ assert len (recwarn ) == 0
781783 assert "No such file or directory: 'style.css'" in result .stderr .str ()
782784
783785 def test_css_invalid_no_html (self , testdir ):
0 commit comments