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

Source from the content-addressed store, hash-verified

742 os.rmdir(self.do_create(pre="aa", suf=".txt"))
743
744 def test_basic_with_bytes_names(self):
745 # mkdtemp can create directories when given all binary parts
746 d = tempfile.gettempdirb()
747 os.rmdir(self.do_create(dir=d))
748 os.rmdir(self.do_create(dir=d, pre=b"a"))
749 os.rmdir(self.do_create(dir=d, suf=b"b"))
750 os.rmdir(self.do_create(dir=d, pre=b"a", suf=b"b"))
751 os.rmdir(self.do_create(dir=d, pre=b"aa", suf=b".txt"))
752 with self.assertRaises(TypeError):
753 os.rmdir(self.do_create(dir=d, pre="aa", suf=b".txt"))
754 with self.assertRaises(TypeError):
755 os.rmdir(self.do_create(dir=d, pre=b"aa", suf=".txt"))
756 with self.assertRaises(TypeError):
757 os.rmdir(self.do_create(dir="", pre=b"aa", suf=b".txt"))
758
759 def test_basic_many(self):
760 # 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