(self)
| 730 | |
| 731 | @patch_list(sys.meta_path) |
| 732 | def test_skip(self): |
| 733 | # Check that tracing is skipped over the import statement in |
| 734 | # 'tfunc_import()'. |
| 735 | |
| 736 | # Remove all but the standard importers. |
| 737 | sys.meta_path[:] = ( |
| 738 | item |
| 739 | for item in sys.meta_path |
| 740 | if item.__module__.startswith('_frozen_importlib') |
| 741 | ) |
| 742 | |
| 743 | code = """ |
| 744 | def main(): |
| 745 | lno = 3 |
| 746 | """ |
| 747 | modules = { TEST_MODULE: code } |
| 748 | with create_modules(modules): |
| 749 | self.expect_set = [ |
| 750 | ('line', 2, 'tfunc_import'), ('step', ), |
| 751 | ('line', 3, 'tfunc_import'), ('quit', ), |
| 752 | ] |
| 753 | skip = ('importlib*', 'zipimport', 'encodings.*', TEST_MODULE) |
| 754 | with TracerRun(self, skip=skip) as tracer: |
| 755 | tracer.runcall(tfunc_import) |
| 756 | |
| 757 | def test_skip_with_no_name_module(self): |
| 758 | # some frames have `globals` with no `__name__` |
nothing calls this directly
no test coverage detected