matthewjohnpayne / sifter

MIT License
1 stars 1 forks source link

pytest / test_tracklets / import sifter #6

Open matthewjohnpayne opened 4 years ago

matthewjohnpayne commented 4 years ago

@Mikea1985 Does sifter have to be installed as a package when running pytest? @matthewjohnpayne having trouble getting pytest to run on test_tracklets.py (do not have it installed as a package, am just working in a dev directory)

(base) MacBook-Pro-31:sifter matthewjohnpayne$ pytest tests/test_tracklets.py ====================================================================================================== test session starts ======================================================================================================= platform darwin -- Python 3.7.6, pytest-5.3.5, py-1.8.1, pluggy-0.13.1 rootdir: /Users/matthewjohnpayne/Envs/sifter plugins: arraydiff-0.3, remotedata-0.3.2, hypothesis-5.4.1, openfiles-0.4.0, doctestplus-0.5.0, astropy-header-0.1.2 collected 0 items / 1 error

============================================================================================================= ERRORS ============================================================================================================= ____ ERROR collecting tests/test_tracklets.py ____ ImportError while importing test module '/Users/matthewjohnpayne/Envs/sifter/tests/test_tracklets.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: tests/test_tracklets.py:26: in from sifter import precalc, sql E ModuleNotFoundError: No module named 'sifter' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ======================================================================================================== 1 error in 0.08s ======================================================================================================== (

Mikea1985 commented 4 years ago

Maybe? Probably? I certainly have it set up as an "installed" package on my machine. From inside the site_packages of my python environment, I just make a soft link pointing to the sifter directory. This is how I set up most of my GitHub repos, so that they are easily usable just like any other package (that's also how I've set up mpcpp), even though they live in a dev directory in my home directory.

On Sat, Feb 29, 2020, 09:43 Matt Payne notifications@github.com wrote:

@Mikea1985 https://github.com/Mikea1985 Does sifter have to be installed as a package when running pytest? @matthewjohnpayne https://github.com/matthewjohnpayne having trouble getting pytest to run on test_tracklets.py (do not have it installed as a package, am just working in a dev directory)

(base) MacBook-Pro-31:sifter matthewjohnpayne$ pytest tests/test_tracklets.py

test session starts

platform darwin -- Python 3.7.6, pytest-5.3.5, py-1.8.1, pluggy-0.13.1 rootdir: /Users/matthewjohnpayne/Envs/sifter plugins: arraydiff-0.3, remotedata-0.3.2, hypothesis-5.4.1, openfiles-0.4.0, doctestplus-0.5.0, astropy-header-0.1.2 collected 0 items / 1 error

============================================================================================================= ERRORS


ERROR collecting tests/test_tracklets.py


ImportError while importing test module '/Users/matthewjohnpayne/Envs/sifter/tests/test_tracklets.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: tests/test_tracklets.py:26: in from sifter import precalc, sql E ModuleNotFoundError: No module named 'sifter' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

1 error in 0.08s

(

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matthewjohnpayne/sifter/issues/6?email_source=notifications&email_token=ADRV7CC7FSU4NF3PD4LB4WTRFEPHPA5CNFSM4K6YNPSKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IRL7CZQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRV7CD7SVDP52GCEQ52NJLRFEPHPANCNFSM4K6YNPSA .