Skip to content

Commit 4b1d71c

Browse files
committed
ValueError with message test
1 parent 9adef68 commit 4b1d71c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lib/test/test_pathlib/test_read.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,14 @@ def test_info_is_symlink(self):
329329
self.assertFalse((p / 'fileA\udfff').info.is_symlink())
330330
self.assertFalse((p / 'fileA\x00').info.is_symlink())
331331

332+
def test_invalid_mode(self):
333+
p = self.root / 'fileA'
334+
335+
with self.assertRaisesRegex(ValueError, "invalid mode"):
336+
vfsopen(p, "q")
332337

338+
339+
333340
class ZipPathReadTest(ReadTestBase, unittest.TestCase):
334341
ground = ZipPathGround(ReadableZipPath)
335342

0 commit comments

Comments
 (0)