Skip to content

Commit

Permalink
Adjust the expectation in test_malformed_paths to expect empty paths …
Browse files Browse the repository at this point in the history
…ignored and .. to be a path segment.
  • Loading branch information
jaraco committed Aug 26, 2024
1 parent 469d7ec commit 447e7d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ def test_getinfo_missing(self, alpharep):
with self.assertRaises(KeyError):
alpharep.getinfo('does-not-exist')

@pytest.mark.xfail(reason="python/cpython#123270")
def test_malformed_paths(self):
"""
Path should handle malformed paths.
Expand All @@ -599,8 +600,9 @@ def test_malformed_paths(self):
assert list(map(str, root.iterdir())) == [
'one-slash.txt',
'two-slash.txt',
'parent.txt',
'..',
]
assert root.joinpath('..').joinpath('parent.txt').read_bytes() == b'content'

@pytest.mark.xfail(reason="python/cpython#123270")
def test_unsupported_names(self):
Expand Down

0 comments on commit 447e7d0

Please sign in to comment.