Skip to content

tests: remove unnecessary -rw option #6543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions testing/python/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_module_considers_pluginmanager_at_import(self, testdir):
def test_invalid_test_module_name(self, testdir):
a = testdir.mkdir("a")
a.ensure("test_one.part1.py")
result = testdir.runpytest("-rw")
result = testdir.runpytest()
result.stdout.fnmatch_lines(
[
"ImportError while importing test module*test_one.part1*",
Expand Down Expand Up @@ -137,7 +137,7 @@ def __init__(self):
pass
"""
)
result = testdir.runpytest("-rw")
result = testdir.runpytest()
result.stdout.fnmatch_lines(
[
"*cannot collect test class 'TestClass1' because it has "
Expand All @@ -153,7 +153,7 @@ def __new__(self):
pass
"""
)
result = testdir.runpytest("-rw")
result = testdir.runpytest()
result.stdout.fnmatch_lines(
[
"*cannot collect test class 'TestClass1' because it has "
Expand Down Expand Up @@ -230,7 +230,7 @@ def test_issue1579_namedtuple(self, testdir):
TestCase = collections.namedtuple('TestCase', ['a'])
"""
)
result = testdir.runpytest("-rw")
result = testdir.runpytest()
result.stdout.fnmatch_lines(
"*cannot collect test class 'TestCase' "
"because it has a __new__ constructor*"
Expand Down Expand Up @@ -1162,7 +1162,7 @@ def test_real():
pass
"""
)
result = testdir.runpytest("-rw")
result = testdir.runpytest()
result.stdout.fnmatch_lines(
[
"*collected 1 item*",
Expand Down
2 changes: 1 addition & 1 deletion testing/test_assertion.py
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ def test_tuple():
assert tpl
"""
)
result = testdir.runpytest("-rw")
result = testdir.runpytest()
output = "\n".join(result.stdout.lines)
assert "WR1" not in output

Expand Down
2 changes: 1 addition & 1 deletion testing/test_cacheprovider.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_cache_failure_warns(self, testdir, monkeypatch):
testdir.tmpdir.ensure_dir(".pytest_cache").chmod(0)
try:
testdir.makepyfile("def test_error(): raise Exception")
result = testdir.runpytest("-rw")
result = testdir.runpytest()
assert result.ret == 1
# warnings from nodeids, lastfailed, and stepwise
result.stdout.fnmatch_lines(
Expand Down
8 changes: 4 additions & 4 deletions testing/test_junitxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ def test_record(record_property, other):
record_property("foo", "<1");
"""
)
result, dom = run_and_parse("-rw")
result, dom = run_and_parse()
node = dom.find_first_by_tag("testsuite")
tnode = node.find_first_by_tag("testcase")
psnode = tnode.find_first_by_tag("properties")
Expand All @@ -1079,7 +1079,7 @@ def test_record_with_same_name(record_property):
record_property("foo", "baz")
"""
)
result, dom = run_and_parse("-rw")
result, dom = run_and_parse()
node = dom.find_first_by_tag("testsuite")
tnode = node.find_first_by_tag("testcase")
psnode = tnode.find_first_by_tag("properties")
Expand Down Expand Up @@ -1121,7 +1121,7 @@ def test_record(record_xml_attribute, other):
record_xml_attribute("foo", "<1");
"""
)
result, dom = run_and_parse("-rw")
result, dom = run_and_parse()
node = dom.find_first_by_tag("testsuite")
tnode = node.find_first_by_tag("testcase")
tnode.assert_attr(bar="1")
Expand Down Expand Up @@ -1156,7 +1156,7 @@ def test_record({fixture_name}, other):
)
)

result, dom = run_and_parse("-rw", family=None)
result, dom = run_and_parse(family=None)
expected_lines = []
if fixture_name == "record_xml_attribute":
expected_lines.append(
Expand Down
2 changes: 1 addition & 1 deletion testing/test_pluginmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def test_plugin_skip(self, testdir, monkeypatch):
)
p.copy(p.dirpath("skipping2.py"))
monkeypatch.setenv("PYTEST_PLUGINS", "skipping2")
result = testdir.runpytest("-rw", "-p", "skipping1", syspathinsert=True)
result = testdir.runpytest("-p", "skipping1", syspathinsert=True)
assert result.ret == ExitCode.NO_TESTS_COLLECTED
result.stdout.fnmatch_lines(
["*skipped plugin*skipping1*hello*", "*skipped plugin*skipping2*hello*"]
Expand Down