MCPcopy Index your code
hub / github.com/python/cpython / test_illegal_mode_arg

Method test_illegal_mode_arg

Lib/test/test_tarfile.py:613–621  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

611 self.test_pathlike_name(os.fsencode(self.tarname))
612
613 def test_illegal_mode_arg(self):
614 with open(tmpname, 'wb'):
615 pass
616 with self.assertRaisesRegex(ValueError, 'mode must be '):
617 tar = self.taropen(tmpname, 'q')
618 with self.assertRaisesRegex(ValueError, 'mode must be '):
619 tar = self.taropen(tmpname, 'rw')
620 with self.assertRaisesRegex(ValueError, 'mode must be '):
621 tar = self.taropen(tmpname, '')
622
623 def test_fileobj_with_offset(self):
624 # Skip the first member and store values from the second member

Callers

nothing calls this directly

Calls 3

assertRaisesRegexMethod · 0.80
taropenMethod · 0.80
openFunction · 0.50

Tested by

no test coverage detected