Skip to content

Commit 09979a3

Browse files
committed
changed fixture from path to str
1 parent 88eebb5 commit 09979a3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/test_encoding.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def charset(request):
2929
@pytest.fixture()
3030
def basic_file(tmp_path: Path) -> Callable[[str, str, str], Tuple[Path, str, str]]:
3131

32-
def makebasicfile(a, b, encoding: str) -> Tuple[Path, str, str]:
32+
def makebasicfile(a, b, encoding: str) -> Tuple[str, str, str]:
3333
"""alternative implementation without the use of `testdir.makepyfile`."""
3434

3535
content = """
@@ -55,7 +55,7 @@ def f():
5555
"""
5656
).strip("\n")
5757

58-
return original_file, expected_diff, expected_result
58+
return str(original_file), expected_diff, expected_result
5959

6060
return makebasicfile
6161

@@ -93,7 +93,7 @@ def test_basic_file_encoding_overwrite(testdir, basic_file, charset):
9393
encoding,
9494
)
9595

96-
assert expected in file.read_text(encoding)
96+
assert expected in Path(file).read_text(encoding)
9797

9898

9999
def test_legacy_diff(testdir, capsys, basic_file, charset):
@@ -143,4 +143,4 @@ def test_legacy_overwrite(testdir, basic_file, charset):
143143
"overwrite",
144144
)
145145

146-
assert expected in file.read_text(_encoding)
146+
assert expected in Path(file).read_text(_encoding)

0 commit comments

Comments
 (0)