pre-commit: update pyupgrade 1.18.0 -> 2.2.1

This commit is contained in:
Ran Benita
2020-04-24 21:51:07 +03:00
parent 23881ad592
commit 3cd97d50f9
6 changed files with 11 additions and 11 deletions

View File

@@ -1339,7 +1339,7 @@ def test_tee_stdio_captures_and_live_prints(testdir):
result.stderr.fnmatch_lines(["*@this is stderr@*"])
# now ensure the output is in the junitxml
with open(os.path.join(testdir.tmpdir.strpath, "output.xml"), "r") as f:
with open(os.path.join(testdir.tmpdir.strpath, "output.xml")) as f:
fullXml = f.read()
assert "@this is stdout@\n" in fullXml
assert "@this is stderr@\n" in fullXml

View File

@@ -1103,11 +1103,11 @@ def test_log_set_path(testdir):
"""
)
testdir.runpytest()
with open(os.path.join(report_dir_base, "test_first"), "r") as rfh:
with open(os.path.join(report_dir_base, "test_first")) as rfh:
content = rfh.read()
assert "message from test 1" in content
with open(os.path.join(report_dir_base, "test_second"), "r") as rfh:
with open(os.path.join(report_dir_base, "test_second")) as rfh:
content = rfh.read()
assert "message from test 2" in content

View File

@@ -1401,14 +1401,14 @@ def test_global_capture_with_live_logging(testdir):
result = testdir.runpytest_subprocess("--log-cli-level=INFO")
assert result.ret == 0
with open("caplog", "r") as f:
with open("caplog") as f:
caplog = f.read()
assert "fix setup" in caplog
assert "something in test" in caplog
assert "fix teardown" in caplog
with open("capstdout", "r") as f:
with open("capstdout") as f:
capstdout = f.read()
assert "fix setup" in capstdout