Visitar URL original
GH-101362: Optimise PurePath(PurePath(...)) by barneygale · Pull Request #101667 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use assertRaisesRegex() to check TypeError message in test.
  • Loading branch information
barneygale committed Mar 5, 2023
commit 0ecae3d57bc60182dece7215ade883aa9bb1cd78
2 changes: 1 addition & 1 deletion Lib/test/test_pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def test_constructor_common(self):

def test_bytes(self):
P = self.cls
with self.assertRaises(TypeError):
with self.assertRaisesRegex(TypeError, "should be a str object or an os.PathLike object"):
P(b'a')
with self.assertRaises(TypeError):
P(b'a', 'b')
Expand Down