(rootdir: Path)
| 42 | |
| 43 | |
| 44 | def test_ModuleAnalyzer_for_module(rootdir: Path) -> None: |
| 45 | analyzer = ModuleAnalyzer.for_module('sphinx') |
| 46 | assert analyzer.modname == 'sphinx' |
| 47 | assert analyzer.srcname == str(SPHINX_MODULE_PATH) |
| 48 | |
| 49 | saved_path = sys.path.copy() |
| 50 | sys.path.insert(0, str(rootdir / 'test-pycode')) |
| 51 | try: |
| 52 | analyzer = ModuleAnalyzer.for_module('cp_1251_coded') |
| 53 | docs = analyzer.find_attr_docs() |
| 54 | assert docs == {('', 'X'): ['It MUST look like X="\u0425"', '']} |
| 55 | finally: |
| 56 | sys.path[:] = saved_path |
| 57 | |
| 58 | |
| 59 | def test_ModuleAnalyzer_find_tags() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…