Skip to content

Commit 49657d8

Browse files
committed
Use os.fspath
1 parent 3181063 commit 49657d8

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

tests/functional/test_install_wheel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ def test_wheel_install_fails_with_unrelated_dist_info(
664664
package = create_basic_wheel_for_package(script, "simple", "0.1.0")
665665
new_name = "unrelated-2.0.0-py2.py3-none-any.whl"
666666
new_package = os.path.join(os.path.dirname(package), new_name)
667-
shutil.move(str(package), new_package)
667+
shutil.move(os.fspath(package), new_package)
668668

669669
result = script.pip(
670670
"install",

tests/lib/venv.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import compileall
2+
import os
23
import shutil
34
import subprocess
45
import sys
@@ -171,11 +172,7 @@ def clear(self) -> None:
171172
self._create(clear=True)
172173

173174
def move(self, location: Union[Path, str]) -> None:
174-
if sys.version_info <= (3, 8):
175-
src = str(self.location)
176-
else:
177-
src = self.location
178-
shutil.move(src, location)
175+
shutil.move(os.fspath(self.location), location)
179176
self.location = Path(location)
180177
self._update_paths()
181178

0 commit comments

Comments
 (0)