Skip to content

Commit 14b0382

Browse files
pre-commit-ci[bot]Tusenka
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent fb29583 commit 14b0382

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

testing/test_assertrewrite.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
from unittest import mock
2323
import zipfile
2424

25-
from _pytest.monkeypatch import MonkeyPatch
26-
2725
import _pytest._code
2826
from _pytest._io.saferepr import DEFAULT_REPR_MAX_SIZE
2927
from _pytest.assertion import util
@@ -1973,7 +1971,6 @@ def test_simple_failure():
19731971
assert hook.find_spec("file") is not None
19741972
assert self.find_spec_calls == ["file"]
19751973

1976-
19771974
def test_assert_excluded_rootpath(
19781975
self, pytester: Pytester, hook: AssertionRewritingHook, monkeypatch
19791976
) -> None:
@@ -1988,12 +1985,11 @@ def test_simple_failure():
19881985
"""
19891986
}
19901987
)
1991-
root_path= "{0}/tests".format(os.getcwd())
1988+
root_path = f"{os.getcwd()}/tests"
19921989
monkeypatch.setattr("os.getcwd", lambda: root_path)
19931990
with mock.patch.object(hook, "fnpats", ["*.py"]):
19941991
assert hook.find_spec("file") is None
19951992

1996-
19971993
@pytest.mark.skipif(
19981994
sys.platform.startswith("win32"), reason="cannot remove cwd on Windows"
19991995
)

0 commit comments

Comments
 (0)