Add vfspath TypeError test (GH-153987)
typeerror with message test
(cherry picked from commit
5763bfdd1b582ef30cf3e6dd88754991973c77ce)
Co-authored-by: Ajob Kustra <ajobkustra.p@gmail.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
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')