8e6ee31596
ci / test (push) Successful in 6m18s
History-free snapshot of the private development repository at cbe45c5 (2026-09-09). Code, docs and public catalogue only; no plant or job knowledge layers, no client or job names (tools/scrub.py clean). The intro deck is left out of this snapshot because its slide images could not be checked for job drawings.
17 lines
772 B
Python
17 lines
772 B
Python
# -*- coding: utf-8 -*-
|
|
"""Put beamcalc/src first on sys.path. Run from the repo root, the bare
|
|
`beamcalc/` directory (which holds fixtures/, tools/, tests/ and src/) is
|
|
what `import beamcalc` finds -- an implicit namespace package with no
|
|
modules in it -- and every test here fails to import. `pip install -e
|
|
beamcalc` would fix it too, but the suite must run on a fresh checkout
|
|
with nothing installed, same as the rest of this repo."""
|
|
import os
|
|
import sys
|
|
|
|
_SRC = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'src')
|
|
if _SRC not in sys.path:
|
|
sys.path.insert(0, _SRC)
|
|
_mod = sys.modules.get('beamcalc')
|
|
if _mod is not None and getattr(_mod, '__file__', None) is None:
|
|
del sys.modules['beamcalc'] # the namespace-package placeholder
|