Closed timfeirg closed 8 years ago
Test: run tox
for all the environments, or tox py27-1.9
for python 2.7 with django 1.9. (needs tox installed)
I run py.test without tox like this: PYTHONPATH=/home/jieter/workspace/django-tables2 py.test
(needs the requirements in requirements/common.pip
installed, usually in a virtualenv)
The example project is a bit broken.
If you still don't manage to run the test, just open a pull request with your work in progress, and travis CI will run the tests for you
cool!
I forgot to mention the example project, I noticed the brokenness, I wanted to fix that and add some more docs and examples regarding pandas, are there any guidelines for writing examples?
also, can I drop support for django<=1.8
in the example project?
@timfeirg I'm actually fixing the example project in #293. I think we should not have a different set of versions supported for django-tables2 in general vs. the example project, so for now, we still need to support 1.7 and 1.8...
@jieter could you take a look at the travis build of my PR?
I'm trying to get the tests working so I can write my own tests, but I think there's still something wrong with my setup or something.
it's complaining 3 failure and 1 error, but I don't think my commit would have cause such failure, are they broken tests?
For example, in the current master, test_general.test_should_support_safe_verbose_name_via_model
will throw an exception telling me to add the django_db
mark, so I did what it told me to and this error will go away
sorry I've been asking a lot, total newbie here
Strange failures indeed. The latest master ran just fine. Are you sure you have the versions specified in the requirements file installed (what does pip freeze
look like)? Do you use tox
or py.test
manually?
Can you try to run the tests on a clean clone of the repo on your machine?
Interesting. This is how a clean install looks on my machine: https://gist.github.com/jieter/e0c2f577fe3c685edd04
I'll have look at the errors.
yeah...weird, I have failures and no InvocationError
, your gist has InvocationError
but no failures, while travis has both
InvocationError
is for flake8, not the units tests... If you use tox
, you'll get that too.
Running PYTHONPATH=/home/jieter/tmp/django-tables2 py.test
works just fine.
No clue what's wrong. Are you sure your working copy is clean?
Entirely my fault, nothing wrong with the code, I've pip install -e django-tables2-timfeirg-fork
, so when I run PYTHONPATH=
pwdpy.test.
in the clean clone, I'm actually testing my own fork, which means my commit have caused all the failures.
Sorry for all the trouble.
Never mind.
Consider using throwaway virtualenvs for this kind of things. Make sure you have a clean environment all the time.
I'm working on #288, stuck at adding tests, how to run tests?
running
py.test
at project root ortests
folder will throw 13 errors like this one:So I added this to
tests/__init__.py
:and then
py.test
gives me 10 other error:I think I must be running tests the wrong way, can someone tells me how to run tests with this django project properly configured?