]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add vfspath TypeError test (#153987)
authorAjob Kustra <ajobkustra.p@gmail.com>
Sat, 18 Jul 2026 16:03:54 +0000 (18:03 +0200)
committerGitHub <noreply@github.com>
Sat, 18 Jul 2026 16:03:54 +0000 (16:03 +0000)
typeerror with message test

Lib/test/test_pathlib/test_join_windows.py

index f30c80605f7f9104f3e33462335379ed0e462d81..5afefa61b585f3b70d914d17011bb995db2f6b8a 100644 (file)
@@ -87,6 +87,11 @@ class JoinTestBase:
         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')