Skip to content

Commit f68c9d6

Browse files
committed
test_get_files_to_process: Fix 2 tests on older Pythons.
1 parent 654c7be commit f68c9d6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/rimport/test_get_files_to_process.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def test_filelist_relpath_with_relpaths(self, tmp_path):
8787

8888
filelist = tmp_path / "file_list.txt"
8989
filelist.write_text("\n".join(filenames), encoding="utf8")
90-
filelist_relpath = filelist.relative_to(os.getcwd(), walk_up=True)
90+
filelist_relpath = os.path.relpath(filelist)
9191

9292
# Run
9393
files_to_process, result = rimport.get_files_to_process(
@@ -144,7 +144,7 @@ def test_filelist_relpath_with_abspaths(self, tmp_path):
144144

145145
filelist = tmp_path / "file_list.txt"
146146
filelist.write_text("\n".join(filenames), encoding="utf8")
147-
filelist_relpath = filelist.relative_to(os.getcwd(), walk_up=True)
147+
filelist_relpath = os.path.relpath(filelist)
148148

149149
# Run
150150
files_to_process, result = rimport.get_files_to_process(

0 commit comments

Comments
 (0)