()
| 16 | |
| 17 | |
| 18 | def test_ModuleAnalyzer_get_module_source() -> None: |
| 19 | assert isinstance(sphinx.__spec__.loader, SourceFileLoader) # type checking |
| 20 | assert ModuleAnalyzer.get_module_source('sphinx') == ( |
| 21 | Path(sphinx.__file__), |
| 22 | sphinx.__spec__.loader.get_source('sphinx'), |
| 23 | ) |
| 24 | |
| 25 | # failed to obtain source information from builtin modules |
| 26 | with pytest.raises(PycodeError): |
| 27 | ModuleAnalyzer.get_module_source('builtins') |
| 28 | with pytest.raises(PycodeError): |
| 29 | ModuleAnalyzer.get_module_source('itertools') |
| 30 | |
| 31 | |
| 32 | def test_ModuleAnalyzer_for_string() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…