From 3732e791a5b1cbd9153bbb6645f302cac69c7bd0 Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Fri, 19 Jul 2019 21:28:22 -0400 Subject: [PATCH] Remove normpath from tests.lib.path.Path. --- tests/lib/__init__.py | 10 +++++++--- tests/lib/path.py | 7 ------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/lib/__init__.py b/tests/lib/__init__.py index 0cfd56956fb..a253b40ed1e 100644 --- a/tests/lib/__init__.py +++ b/tests/lib/__init__.py @@ -302,14 +302,16 @@ def assert_installed(self, pkg_name, editable=True, with_files=[], sorted(self.files_created.keys()))) for f in with_files: - if not (pkg_dir / f).normpath in self.files_created: + normalized_path = os.path.normpath(pkg_dir / f) + if normalized_path not in self.files_created: raise TestFailure( 'Package directory %r missing expected content %r' % (pkg_dir, f) ) for f in without_files: - if (pkg_dir / f).normpath in self.files_created: + normalized_path = os.path.normpath(pkg_dir / f) + if normalized_path in self.files_created: raise TestFailure( 'Package directory %r has unexpected content %f' % (pkg_dir, f) @@ -424,7 +426,9 @@ def __init__(self, base_path, *args, **kwargs): ) if sys.platform == 'win32': if sys.version_info >= (3, 5): - scripts_base = self.user_site_path.joinpath('..').normpath + scripts_base = Path( + os.path.normpath(self.user_site_path.joinpath('..')) + ) else: scripts_base = self.user_base_path self.user_bin_path = scripts_base.joinpath('Scripts') diff --git a/tests/lib/path.py b/tests/lib/path.py index 18e9d744ebe..25785a62ba4 100644 --- a/tests/lib/path.py +++ b/tests/lib/path.py @@ -137,13 +137,6 @@ def resolve(self): """ return Path(os.path.realpath(self)) - @property - def normpath(self): - """ - '/home/x/.././a//bc.d' -> '/home/a/bc.d' - """ - return Path(os.path.normpath(self)) - @property def parent(self): """