Closed koobs closed 11 years ago
Am I misunderstanding, or doesn't make test
already do this?
setup.py nosetests runs tests, setup.py test runs:
python setup.py test
Checking pep8 compliance...
pep8: No such file or directory
*** [pep8] Error code 1
Then after installing pep8:
Checking pep8 compliance...
Running pyflakes...
pyflakes: No such file or directory
*** [pyflakes] Error code 1
Then after installing pyflakes:
Checking pep8 compliance...
Running pyflakes...
Running all tests...
No yanc plugin for nosetests found. Color output unavailable.
Running tests...
./run-tests.sh: 4: Bad file descriptor
FAILURE
*** [test] Error code 1
I stopped after that :)
I'm thinking:
Make things as simple as possible, but not simpler -Albert Einstein
Yeah I think you should be using make test
. :) It handles executing run-tests.sh
, which requires setting some environment variables if you want to avoid things like pep8. We don't support setup.py test
directly anymore; prefer make
instead.
make test gives me:
No yanc plugin for nosetests found. Color output unavailable.
Running tests...
./run-tests.sh: 4: Bad file descriptor
FAILURE
*** [test] Error code 1
May I ask why the preference for make? I've seen a good push in other projects to standardise on setup.py test (with and without tox, py.test nosetest,
btw: Oh wow I just saw run_tests.sh's contents :)
I can't reproduce that bad file descriptor error. Can you give us some more details about your environment?
Python's build tooling is just not a good match for what we're doing here, make is a good candidate and well supported across the board, plus I've used make several times with other Python projects and I find it's just a great tool all around. Going forward, we intend to use it.
No argument here, I just noticed it as an outlier in Python projects. I can continue to invoke python setup.py nosetests without kicking up anymore of a fuss :)
Well I'd like to know why the test runner isn't working for you. make test
should "just work". You can just use nosetests directly, no need to involve setup.py at all, if you go that route.
Happy to help if you can assist with debug or what/how I should be investigating. Am on IRC if you need me :)
@koobs which IRC network?
Ah, freenode :)
I had the same issue when I tried to run the test for the first time. And it turned out that the following libraries need to be installed first.
pip install pep8 pip install pyfakes pip install nose pip install coverage pip install mock
@yejienihao that is documented in the README.
As an OS packager/porter, I'm not necessarily interested in pep/flake style development testing (though I will fix things and report upstream if I can).
While these of course are highly relevant to the author for people contributing code back to the project and for QA'ing PR's, I'm mostly interested in assuring quality for our end users by ensuring the test suite passes, and reporting failures back
Accordingly, I'd like to see the test command fail gracefully and continue in the face of ImportErrors for all the relevant steps in the test process. This also saves you (us) from having to create a special 'tests-only' command, which runs nothing but the tests (and feels a little backward)
Ideally, a special Makefile to coordinate these things is not necessary in the medium term, and rauth can use standard pythonic command classes to do everything it needs.