MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_illegal_mode_arg

Method test_illegal_mode_arg

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

Source from the content-addressed store, hash-verified

613 self.test_pathlike_name(os.fsencode(self.tarname))
614
615 def test_illegal_mode_arg(self):
616 with open(tmpname, 'wb'):
617 pass
618 with self.assertRaisesRegex(ValueError, 'mode must be '):
619 tar = self.taropen(tmpname, 'q')
620 with self.assertRaisesRegex(ValueError, 'mode must be '):
621 tar = self.taropen(tmpname, 'rw')
622 with self.assertRaisesRegex(ValueError, 'mode must be '):
623 tar = self.taropen(tmpname, '')
624
625 def test_fileobj_with_offset(self):
626 # 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