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

Method test_basic_with_bytes_names

Lib/test/test_tempfile.py:651–666  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

649 self.do_create(dir=".")
650
651 def test_basic_with_bytes_names(self):
652 # mkstemp can create files when given name parts all
653 # specified as bytes.
654 d = tempfile.gettempdirb()
655 self.do_create(dir=d, suf=b"")
656 self.do_create(dir=d, pre=b"a")
657 self.do_create(dir=d, suf=b"b")
658 self.do_create(dir=d, pre=b"a", suf=b"b")
659 self.do_create(dir=d, pre=b"aa", suf=b".txt")
660 self.do_create(dir=b".")
661 with self.assertRaises(TypeError):
662 self.do_create(dir=".", pre=b"aa", suf=b".txt")
663 with self.assertRaises(TypeError):
664 self.do_create(dir=b".", pre="aa", suf=b".txt")
665 with self.assertRaises(TypeError):
666 self.do_create(dir=b".", pre=b"aa", suf=".txt")
667
668
669 def test_choose_directory(self):

Callers

nothing calls this directly

Calls 2

do_createMethod · 0.95
assertRaisesMethod · 0.45

Tested by

no test coverage detected