| 381 | self._do_test(same_name_as_bad_test) |
| 382 | |
| 383 | def test_bytecode(self): |
| 384 | base_path = os.path.join(self.test_dir, 'a') |
| 385 | source_path = base_path + importlib.machinery.SOURCE_SUFFIXES[0] |
| 386 | bytecode_path = base_path + importlib.machinery.BYTECODE_SUFFIXES[0] |
| 387 | with open_file(source_path) as file: |
| 388 | file.write('testing_modulefinder = True\n'.encode('utf-8')) |
| 389 | py_compile.compile(source_path, cfile=bytecode_path) |
| 390 | os.remove(source_path) |
| 391 | self._do_test(bytecode_test) |
| 392 | |
| 393 | # TODO: RUSTPYTHON; panics at code.rs with 'called Option::unwrap() on a None value' |
| 394 | @unittest.skip("TODO: RUSTPYTHON; panics in co_filename replacement") |