Skip to content

Commit 66a68e3

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 9d3afc2 commit 66a68e3

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
@@ -1957,7 +1955,6 @@ def test_simple_failure():
19571955
assert hook.find_spec("file") is not None
19581956
assert self.find_spec_calls == ["file"]
19591957

1960-
19611958
def test_assert_excluded_rootpath(
19621959
self, pytester: Pytester, hook: AssertionRewritingHook, monkeypatch
19631960
) -> None:
@@ -1972,12 +1969,11 @@ def test_simple_failure():
19721969
"""
19731970
}
19741971
)
1975-
root_path= "{0}/tests".format(os.getcwd())
1972+
root_path = f"{os.getcwd()}/tests"
19761973
monkeypatch.setattr("os.getcwd", lambda: root_path)
19771974
with mock.patch.object(hook, "fnpats", ["*.py"]):
19781975
assert hook.find_spec("file") is None
19791976

1980-
19811977
@pytest.mark.skipif(
19821978
sys.platform.startswith("win32"), reason="cannot remove cwd on Windows"
19831979
)

0 commit comments

Comments
 (0)