Skip to content

Commit becc0f6

Browse files
miss-islingtonAjobKtomasr8
authored
[3.15] Add vfspath TypeError test (GH-153987) (#154010)
Add vfspath TypeError test (GH-153987) typeerror with message test (cherry picked from commit 5763bfd) Co-authored-by: Ajob Kustra <ajobkustra.p@gmail.com> Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
1 parent 13b29a9 commit becc0f6

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
@@ -87,6 +87,11 @@ def test_vfspath(self):
8787
p = self.cls(r'\\a\b\c\d')
8888
self.assertEqual(vfspath(p), '\\\\a\\b\\c\\d')
8989

90+
def test_invalid_vspath(self):
91+
msg = "expected JoinablePath object, not NoneType"
92+
with self.assertRaisesRegex(TypeError, msg):
93+
vfspath(None)
94+
9095
def test_parts(self):
9196
P = self.cls
9297
p = P(r'c:a\b')

0 commit comments

Comments
 (0)