Closed TadLeonard closed 9 years ago
Well, I'm not sure how it happened, but despite your which green
output, your traceback output shows that you are running /usr/local/bin/green
which is using /usr/local/lib/python3.4/site-packages
which doesn't have numpy installed. You just need to get the right green called.
One way is you could try calling the virtualenv copy of green directly:
/home/tad/Downloads/share/husl-numpy/env/bin/green test.py
Thanks for the help. Yes, running env/bin/green directly works. I still don't understand why nose
and py.test
behave differently in my setup.
If you don't mind me asking an unrelated question here... how do I get green
to run py.test
/nose
style tests (i.e. simple functions starting with "test_' that pass/fail via assert statements)?
@TadLeonard Green's test discovery is currently based on the built-in unittest implementation, which only looks at unittest.TestCase
subclasses. @msoedov was saying just yesterday in the Gitter channel that he was going to look into adding that type of support to discovery.
If we do add support, I expect that you will most likely need to enable it explicitly via some option such as --extra-discovery
. Those of us who are used to using unittest
actually have non-unit-test-related functions that start with test_
...
I'm using
py.test
for my project. It works nicely from within a virtualenv.Note that
numpy
is importable. Let's run the tests.Yay! It works. Now, here's where I've put
green
:Let's run the tests with
green
:What might I be doing wrong? Thanks.