(module_path)
| 33 | |
| 34 | |
| 35 | def remove_bytecode(module_path): |
| 36 | paths = [module_path + "c"] |
| 37 | cache_tag = sys.implementation.cache_tag |
| 38 | modname, ext = os.path.splitext(module_path.split(os.sep)[-1]) |
| 39 | paths.append( |
| 40 | os.path.join( |
| 41 | os.path.dirname(module_path), |
| 42 | "__pycache__", |
| 43 | f"{modname}.{cache_tag}.pyc", |
| 44 | ) |
| 45 | ) |
| 46 | for path in paths: |
| 47 | if os.path.exists(path): |
| 48 | os.unlink(path) |
| 49 | |
| 50 | |
| 51 | loader_template = """ |
no test coverage detected