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

Method open_dirfd

Lib/test/test_glob.py:47–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

45 self.open_dirfd()
46
47 def open_dirfd(self):
48 if self.dir_fd is not None:
49 os.close(self.dir_fd)
50 if {os.open, os.stat} <= os.supports_dir_fd and os.scandir in os.supports_fd:
51 self.dir_fd = os.open(self.tempdir, os.O_RDONLY | os.O_DIRECTORY)
52 else:
53 self.dir_fd = None
54
55 def tearDown(self):
56 if self.dir_fd is not None:

Callers 2

setUpMethod · 0.95
test_glob_named_pipeMethod · 0.95

Calls 2

closeMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected