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

Method test_directory_writable

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

Source from the content-addressed store, hash-verified

599 "%r is not a directory" % d)
600
601 def test_directory_writable(self):
602 # gettempdir returns a directory writable by the user
603
604 # sneaky: just instantiate a NamedTemporaryFile, which
605 # defaults to writing into the directory returned by
606 # gettempdir.
607 with tempfile.NamedTemporaryFile() as file:
608 file.write(b"blat")
609
610 def test_same_thing(self):
611 # gettempdir always returns the same object

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected