MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / get_fds

Function get_fds

tests/conftest.py:84–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82 if test_fds:
83 # Gather detailed information about leaked fds.
84 def get_fds():
85 import subprocess
86 path = 'PyMuPDF-linx-fds'
87 path_l = 'PyMuPDF-linx-fds-l'
88 command = f'ls /proc/{os.getpid()}/fd > {path}'
89 command_l = f'ls -l /proc/{os.getpid()}/fd > {path_l}'
90 subprocess.run(command, shell=1)
91 subprocess.run(command_l, shell=1)
92 with open(path) as f:
93 ret = f.read()
94 ret = ret.replace('\n', ' ')
95 with open(path_l) as f:
96 ret_l = f.read()
97 return ret, ret_l
98 open_fds_before, open_fds_before_l = get_fds()
99
100 pymupdf._log_items_clear()

Callers 1

wrapFunction · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…