Skip to content

Commit 10e243d

Browse files
authored
Merge pull request #6543 from blueyed/rm-rw
tests: remove unnecessary `-rw` option
2 parents eb7a57f + e7444bb commit 10e243d

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

testing/python/collect.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def test_module_considers_pluginmanager_at_import(self, testdir):
6868
def test_invalid_test_module_name(self, testdir):
6969
a = testdir.mkdir("a")
7070
a.ensure("test_one.part1.py")
71-
result = testdir.runpytest("-rw")
71+
result = testdir.runpytest()
7272
result.stdout.fnmatch_lines(
7373
[
7474
"ImportError while importing test module*test_one.part1*",
@@ -137,7 +137,7 @@ def __init__(self):
137137
pass
138138
"""
139139
)
140-
result = testdir.runpytest("-rw")
140+
result = testdir.runpytest()
141141
result.stdout.fnmatch_lines(
142142
[
143143
"*cannot collect test class 'TestClass1' because it has "
@@ -153,7 +153,7 @@ def __new__(self):
153153
pass
154154
"""
155155
)
156-
result = testdir.runpytest("-rw")
156+
result = testdir.runpytest()
157157
result.stdout.fnmatch_lines(
158158
[
159159
"*cannot collect test class 'TestClass1' because it has "
@@ -230,7 +230,7 @@ def test_issue1579_namedtuple(self, testdir):
230230
TestCase = collections.namedtuple('TestCase', ['a'])
231231
"""
232232
)
233-
result = testdir.runpytest("-rw")
233+
result = testdir.runpytest()
234234
result.stdout.fnmatch_lines(
235235
"*cannot collect test class 'TestCase' "
236236
"because it has a __new__ constructor*"
@@ -1162,7 +1162,7 @@ def test_real():
11621162
pass
11631163
"""
11641164
)
1165-
result = testdir.runpytest("-rw")
1165+
result = testdir.runpytest()
11661166
result.stdout.fnmatch_lines(
11671167
[
11681168
"*collected 1 item*",

testing/test_assertion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ def test_tuple():
13491349
assert tpl
13501350
"""
13511351
)
1352-
result = testdir.runpytest("-rw")
1352+
result = testdir.runpytest()
13531353
output = "\n".join(result.stdout.lines)
13541354
assert "WR1" not in output
13551355

testing/test_cacheprovider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_cache_failure_warns(self, testdir, monkeypatch):
6666
testdir.tmpdir.ensure_dir(".pytest_cache").chmod(0)
6767
try:
6868
testdir.makepyfile("def test_error(): raise Exception")
69-
result = testdir.runpytest("-rw")
69+
result = testdir.runpytest()
7070
assert result.ret == 1
7171
# warnings from nodeids, lastfailed, and stepwise
7272
result.stdout.fnmatch_lines(

testing/test_junitxml.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ def test_record(record_property, other):
10611061
record_property("foo", "<1");
10621062
"""
10631063
)
1064-
result, dom = run_and_parse("-rw")
1064+
result, dom = run_and_parse()
10651065
node = dom.find_first_by_tag("testsuite")
10661066
tnode = node.find_first_by_tag("testcase")
10671067
psnode = tnode.find_first_by_tag("properties")
@@ -1079,7 +1079,7 @@ def test_record_with_same_name(record_property):
10791079
record_property("foo", "baz")
10801080
"""
10811081
)
1082-
result, dom = run_and_parse("-rw")
1082+
result, dom = run_and_parse()
10831083
node = dom.find_first_by_tag("testsuite")
10841084
tnode = node.find_first_by_tag("testcase")
10851085
psnode = tnode.find_first_by_tag("properties")
@@ -1121,7 +1121,7 @@ def test_record(record_xml_attribute, other):
11211121
record_xml_attribute("foo", "<1");
11221122
"""
11231123
)
1124-
result, dom = run_and_parse("-rw")
1124+
result, dom = run_and_parse()
11251125
node = dom.find_first_by_tag("testsuite")
11261126
tnode = node.find_first_by_tag("testcase")
11271127
tnode.assert_attr(bar="1")
@@ -1156,7 +1156,7 @@ def test_record({fixture_name}, other):
11561156
)
11571157
)
11581158

1159-
result, dom = run_and_parse("-rw", family=None)
1159+
result, dom = run_and_parse(family=None)
11601160
expected_lines = []
11611161
if fixture_name == "record_xml_attribute":
11621162
expected_lines.append(

testing/test_pluginmanager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def test_plugin_skip(self, testdir, monkeypatch):
256256
)
257257
p.copy(p.dirpath("skipping2.py"))
258258
monkeypatch.setenv("PYTEST_PLUGINS", "skipping2")
259-
result = testdir.runpytest("-rw", "-p", "skipping1", syspathinsert=True)
259+
result = testdir.runpytest("-p", "skipping1", syspathinsert=True)
260260
assert result.ret == ExitCode.NO_TESTS_COLLECTED
261261
result.stdout.fnmatch_lines(
262262
["*skipped plugin*skipping1*hello*", "*skipped plugin*skipping2*hello*"]

0 commit comments

Comments
 (0)