Skip to content

Commit 14a352a

Browse files
AjobKmiss-islington
authored andcommitted
Add vfspath TypeError test (GH-153987)
typeerror with message test (cherry picked from commit 5763bfd) Co-authored-by: Ajob Kustra <ajobkustra.p@gmail.com>
1 parent 02a91ea commit 14a352a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Lib/test/test_pathlib/test_join_windows.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ def test_str(self):
8282
p = self.cls(r'\\a\b\c\d')
8383
self.assertEqual(str(p), '\\\\a\\b\\c\\d')
8484

85+
def test_invalid_vspath(self):
86+
msg = "expected JoinablePath object, not NoneType"
87+
with self.assertRaisesRegex(TypeError, msg):
88+
vfspath(None)
89+
8590
def test_parts(self):
8691
P = self.cls
8792
p = P(r'c:a\b')

0 commit comments

Comments
 (0)