# -*- 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