From 0d286012f79784b05bd1ddbbe9ead01dcfb844fe Mon Sep 17 00:00:00 2001 From: Christopher Hunt Date: Sat, 20 Jul 2019 19:12:07 -0400 Subject: [PATCH] Remove copy from tests.lib.path.Path. (#6746) --- tests/functional/test_download.py | 8 +++++--- tests/lib/path.py | 3 --- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/functional/test_download.py b/tests/functional/test_download.py index a0ac7f353..1a20870c0 100644 --- a/tests/functional/test_download.py +++ b/tests/functional/test_download.py @@ -1,4 +1,5 @@ import os.path +import shutil import textwrap import pytest @@ -8,9 +9,10 @@ from tests.lib.path import Path def fake_wheel(data, wheel_path): - data.packages.joinpath( - 'simple.dist-0.1-py2.py3-none-any.whl' - ).copy(data.packages.joinpath(wheel_path)) + shutil.copy( + data.packages.joinpath('simple.dist-0.1-py2.py3-none-any.whl'), + data.packages.joinpath(wheel_path), + ) @pytest.mark.network diff --git a/tests/lib/path.py b/tests/lib/path.py index 25785a62b..42e89079b 100644 --- a/tests/lib/path.py +++ b/tests/lib/path.py @@ -179,9 +179,6 @@ class Path(_base): """ return os.rmdir(self) - def copy(self, to): - return shutil.copy(self, to) - def copytree(self, to): """ Copies a directory tree to another path.