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:763–776  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

761 os.rmdir(self.do_create(pre="aa", suf=".txt"))
762
763 def test_basic_with_bytes_names(self):
764 # mkdtemp can create directories when given all binary parts
765 d = tempfile.gettempdirb()
766 os.rmdir(self.do_create(dir=d))
767 os.rmdir(self.do_create(dir=d, pre=b"a"))
768 os.rmdir(self.do_create(dir=d, suf=b"b"))
769 os.rmdir(self.do_create(dir=d, pre=b"a", suf=b"b"))
770 os.rmdir(self.do_create(dir=d, pre=b"aa", suf=b".txt"))
771 with self.assertRaises(TypeError):
772 os.rmdir(self.do_create(dir=d, pre="aa", suf=b".txt"))
773 with self.assertRaises(TypeError):
774 os.rmdir(self.do_create(dir=d, pre=b"aa", suf=".txt"))
775 with self.assertRaises(TypeError):
776 os.rmdir(self.do_create(dir="", pre=b"aa", suf=b".txt"))
777
778 def test_basic_many(self):
779 # mkdtemp can create many directories (stochastic)

Callers

nothing calls this directly

Calls 3

do_createMethod · 0.95
rmdirMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected