diff --git a/distutils/tests/test_util.py b/distutils/tests/test_util.py index b24f1fb4..c05df03a 100644 --- a/distutils/tests/test_util.py +++ b/distutils/tests/test_util.py @@ -79,8 +79,6 @@ def test_convert_path(self): with pytest.raises(ValueError): convert_path('/home/to/my/stuff') - with pytest.raises(ValueError): - convert_path('home/to/my/stuff/') with pytest.raises(ValueError): convert_path(pathlib.Path('/home/to/my/stuff')) diff --git a/distutils/util.py b/distutils/util.py index f8e4fbb7..50ebb1c1 100644 --- a/distutils/util.py +++ b/distutils/util.py @@ -151,8 +151,6 @@ def make_native(pathname: str) -> str: return pathname if pathname[0] == '/': raise ValueError(f"path '{pathname}' cannot be absolute") - if pathname[-1] == '/': - raise ValueError(f"path '{pathname}' cannot end with '/'") paths = pathname.split('/') while '.' in paths: