()
| 62 | |
| 63 | |
| 64 | def 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 | |
| 76 | def _memoize(func): |
no test coverage detected