-
Couldn't load subscription status.
- Fork 0
Closed
Description
Another challenge I've encountered pertains to running tests, namely doctests. The problem with running doctests in a shallow repo is that relative references are no longer viable. Consider in coherent.build (0.4.0):
# __init__.py
from . import discoveryAlthough the discovery module exists alongside __init__.py and both will be/are found in coherent/build after installation, pytest "discovers" __init__.py as a plain module and not in the context of coherent.build, so fails thus:
__________________________________________________________ ERROR collecting __init__.py __________________________________________________________
ImportError while importing test module '/Users/jaraco/code/coherent-oss/coherent.build/__init__.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
__init__.py:32: in <module>
from . import discovery
E ImportError: attempted relative import with no known parent package
Originally posted by @jaraco in coherent-oss/system#1
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done