From 14a352ad545cb057e35e7a716494d46019a90209 Mon Sep 17 00:00:00 2001 From: Ajob Kustra Date: Sat, 18 Jul 2026 18:03:54 +0200 Subject: [PATCH] Add vfspath TypeError test (GH-153987) typeerror with message test (cherry picked from commit 5763bfdd1b582ef30cf3e6dd88754991973c77ce) Co-authored-by: Ajob Kustra --- 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 2cc634f25efc682..9d60a8c206cbc7f 100644 --- a/Lib/test/test_pathlib/test_join_windows.py +++ b/Lib/test/test_pathlib/test_join_windows.py @@ -82,6 +82,11 @@ def test_str(self): p = self.cls(r'\\a\b\c\d') self.assertEqual(str(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')