MCPcopy Create free account
hub / github.com/numpy/numpy / get_temp_module_name

Function get_temp_module_name

numpy/f2py/tests/util.py:64–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62
63
64def get_temp_module_name():
65 # Assume single-threaded, and the module dir usable only by this thread
66 global _module_num
67 get_module_dir()
68 name = "_test_ext_module_%d" % _module_num
69 _module_num += 1
70 if name in sys.modules:
71 # this should not be possible, but check anyway
72 raise RuntimeError("Temporary module name already in use.")
73 return name
74
75
76def _memoize(func):

Callers 2

build_moduleFunction · 0.85
build_module_distutilsFunction · 0.85

Calls 1

get_module_dirFunction · 0.85

Tested by

no test coverage detected