File tree Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -97,13 +97,29 @@ def test_append_parse_args(
9797 assert config .option .tbstyle == "short"
9898 assert config .option .verbose
9999
100- def test_report_chars_long_option (
101- self , pytester : Pytester , tmp_path : Path , monkeypatch : MonkeyPatch
100+ @pytest .mark .parametrize (
101+ "opts, expected" ,
102+ [
103+ ("-rfE" , "fE" ),
104+ ("--report-chars=fE" , "fE" ),
105+ ("-rA" , "A" ),
106+ ("--report-chars=A" , "A" ),
107+ ("-rfs" , "fs" ),
108+ ("--report-chars=fs" , "fs" ),
109+ ],
110+ )
111+ def test_report_chars_option (
112+ self ,
113+ pytester : Pytester ,
114+ tmp_path : Path ,
115+ monkeypatch : MonkeyPatch ,
116+ opts : str ,
117+ expected : str ,
102118 ) -> None :
103- """Test that --report-chars is parsed correctly."""
104- monkeypatch .setenv ("PYTEST_ADDOPTS" , "--report-chars=fE" )
119+ """Test that -r/- -report-chars is parsed correctly."""
120+ monkeypatch .setenv ("PYTEST_ADDOPTS" , opts )
105121 config = pytester .parseconfig (tmp_path )
106- assert config .option .reportchars == "fE"
122+ assert config .option .reportchars == expected
107123
108124 def test_tox_ini_wrong_version (self , pytester : Pytester ) -> None :
109125 pytester .makefile (
You can’t perform that action at this time.
0 commit comments