@@ -807,9 +807,9 @@ def test():
807
807
def test_fail_extra_reporting (testdir , monkeypatch ):
808
808
monkeypatch .setenv ("COLUMNS" , "80" )
809
809
testdir .makepyfile ("def test_this(): assert 0, 'this_failed' * 100" )
810
- result = testdir .runpytest ()
810
+ result = testdir .runpytest ("-rN" )
811
811
result .stdout .no_fnmatch_line ("*short test summary*" )
812
- result = testdir .runpytest ("-rf" )
812
+ result = testdir .runpytest ()
813
813
result .stdout .fnmatch_lines (
814
814
[
815
815
"*test summary*" ,
@@ -918,15 +918,20 @@ def test_this(i):
918
918
919
919
920
920
def test_getreportopt ():
921
+ from _pytest .terminal import _REPORTCHARS_DEFAULT
922
+
921
923
class Config :
922
924
class Option :
923
- reportchars = ""
925
+ reportchars = _REPORTCHARS_DEFAULT
924
926
disable_warnings = True
925
927
926
928
option = Option ()
927
929
928
930
config = Config ()
929
931
932
+ # Default.
933
+ assert getreportopt (config ) == "fE"
934
+
930
935
config .option .reportchars = "sf"
931
936
assert getreportopt (config ) == "sf"
932
937
@@ -939,7 +944,7 @@ class Option:
939
944
assert getreportopt (config ) == "sxXwEf" # NOTE: "w" included!
940
945
941
946
config .option .reportchars = "sfx"
942
- assert getreportopt (config ) == "sfxw "
947
+ assert getreportopt (config ) == "wsfx "
943
948
944
949
config .option .reportchars = "sfxw"
945
950
assert getreportopt (config ) == "sfxw"
@@ -950,6 +955,9 @@ class Option:
950
955
config .option .reportchars = "A"
951
956
assert getreportopt (config ) == "PpsxXwEf"
952
957
958
+ config .option .reportchars = "AN"
959
+ assert getreportopt (config ) == ""
960
+
953
961
954
962
def test_terminalreporter_reportopt_addopts (testdir ):
955
963
testdir .makeini ("[pytest]\n addopts=-rs" )
@@ -1065,7 +1073,7 @@ def test_func():
1065
1073
)
1066
1074
for tbopt in ["long" , "short" , "no" ]:
1067
1075
print ("testing --tb=%s..." % tbopt )
1068
- result = testdir .runpytest ("--tb=%s" % tbopt )
1076
+ result = testdir .runpytest ("-rN" , "- -tb=%s" % tbopt )
1069
1077
s = result .stdout .str ()
1070
1078
if tbopt == "long" :
1071
1079
assert "print(6*7)" in s
0 commit comments