edoburu/django-parler — pull request #18 by NotSqrt (2014-05-27 21:57:03+00:00)
Title: Tests & coverage

# Work in progress - do not merge yet

Hi!

I am getting closer to finishing this task.

- [x] include tests from ``article`` app
- [x] add python 3.4 to tox and travis
- [x] show coverage in tox with a specific target
- [x] plug to coveralls.io with travis builds : https://coveralls.io/r/NotSqrt/django-parler
- [ ] fix tests in django1.4 : https://travis-ci.org/NotSqrt/django-parler
- [ ] add more tests depending on the coverage ??
- [ ] add coveralls badge to README (currently [![Coverage Status](https://img.shields.io/coveralls/NotSqrt/django-parler.svg)](https://coveralls.io/r/NotSqrt/django-parler?branch=coverage)), but this will need to wait until after the merge to master, and configuration with repo edoburu/django-parler

## tests from ``article`` app

This is relatively ugly, but django1.6 does not discover the same tests when running ``manage.py test article parler`` or ``manage.py test article parler.tests``.
The later is also failing on previous django versions.
I did not try to play with the test runner to handle this.

2 requirements:
- when using multiple commands, tox only takes into account the last one, so it may mask failures. Then, we have to run all tests in a single command
- for coverage, it is easier not having to merge results from partial tests

So, in travis, I have to resort to:
```bash
bash -c "if [ '$DJANGO' = '1.6.0' ]; then coverage run --source=example,parler example/manage.py test article parler.tests; else coverage run --source=example,parler example/manage.py test article parler; fi"
```
and I use a different command in tox for django 1.6.

I am looking for suggestions on this regard !

Please suggest any tests to add, etc..