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

Method test_basic_with_bytes_names

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

Source from the content-addressed store, hash-verified

668 self.do_create(dir=".")
669
670 def test_basic_with_bytes_names(self):
671 # mkstemp can create files when given name parts all
672 # specified as bytes.
673 d = tempfile.gettempdirb()
674 self.do_create(dir=d, suf=b"")
675 self.do_create(dir=d, pre=b"a")
676 self.do_create(dir=d, suf=b"b")
677 self.do_create(dir=d, pre=b"a", suf=b"b")
678 self.do_create(dir=d, pre=b"aa", suf=b".txt")
679 self.do_create(dir=b".")
680 with self.assertRaises(TypeError):
681 self.do_create(dir=".", pre=b"aa", suf=b".txt")
682 with self.assertRaises(TypeError):
683 self.do_create(dir=b".", pre="aa", suf=b".txt")
684 with self.assertRaises(TypeError):
685 self.do_create(dir=b".", pre=b"aa", suf=".txt")
686
687
688 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