From 554f65c5795e3c921af43819639037351b283e66 Mon Sep 17 00:00:00 2001 From: AjobK Date: Sat, 18 Jul 2026 16:45:04 +0200 Subject: [PATCH] typeerror with message test --- Lib/test/test_pathlib/test_join_windows.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib/test/test_pathlib/test_join_windows.py b/Lib/test/test_pathlib/test_join_windows.py index f30c80605f7f910..5afefa61b585f3b 100644 --- a/Lib/test/test_pathlib/test_join_windows.py +++ b/Lib/test/test_pathlib/test_join_windows.py @@ -87,6 +87,11 @@ def test_vfspath(self): p = self.cls(r'\\a\b\c\d') self.assertEqual(vfspath(p), '\\\\a\\b\\c\\d') + def test_invalid_vspath(self): + msg = "expected JoinablePath object, not NoneType" + with self.assertRaisesRegex(TypeError, msg): + vfspath(None) + def test_parts(self): P = self.cls p = P(r'c:a\b')