Skip to content

Fails during test runs with coverage

If test coverage is being collected via the coverage package, sinfo(dependencies=True) fails like this:

            for mod_name in clean_modules:
                mod_names.append(mod_name)
>               mod = sys.modules[mod_name]
E               KeyError: '$coverage'

/usr/local/lib/python3.8/site-packages/sinfo/main.py:191: KeyError

I would suggest that if the module isn't present in sys.modules, sinfo should not error.