Skip to content

Commit 9d86bf2

Browse files
committed
Refactor as simple replace. If a full string substitution proves to be necessary, let's create a mapping.
1 parent 12fd59d commit 9d86bf2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

distutils/tests/test_install.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ def check_path(got, expected):
5656
expected = os.path.normpath(expected)
5757
self.assertEqual(got, expected)
5858

59-
impl_name = sys.implementation.name
60-
if impl_name == "cpython":
61-
impl_name = "python"
59+
impl_name = sys.implementation.name.replace("cpython", "python")
6260
libdir = os.path.join(destination, "lib", impl_name)
6361
check_path(cmd.install_lib, libdir)
6462
_platlibdir = getattr(sys, "platlibdir", "lib")

0 commit comments

Comments
 (0)