ndparker/tdi — pull request #3 by AvdN (2013-10-20 14:59:37+00:00)
Title: pytest_00: initial py.test testing for tdi

- run_tests filters out python files under tests/ that start with "test_"
- py.test (by default) only runs those files
- tox.ini file for creation of virtualenvs for testing
- initial conversion of 3 files (9 tests)
- test coverage based on py.test

Please note:
- tox needs to find Python2.5, 2.6 and 2.7 executables, it expects these in
'/usr/bin', but there is a PR to allow explicit specification (my
/usr/bin/python2.7 is 2.7.3 but with the patch I get my virtualenvs from
/opt/python/x.y.z (2.7.5, 2.6.8, 2.5.6, etc.)
- tox keeps virtualenvs (under .tox) only first time the virtualenv is
created needs installing (in addition I have a local PyPI cache, which
speeds up the initial setup).

- added MANIFEST, ttake MANIFEST out of gitignore

- generated test_XX.py files for all files under tests
- there is a small helper file _test_support.py under tdi. It provides
the mechanism to do both C and pure Python tests (and can
easily be adapted to skip one of those for a particular Python version)
(fixture 'pure', which adds pure python testing to a test case)

- there are a few files that have skips in them:
find tests -name test_*.py | xargs fgrep -l pytest.skip
some of these are because things are unclear, others because
they need smart split-up in multiple tests with automation
- all test files are kept separate, having only one test. Some should IMHO
be combined e.g. rendering/test_name_unicode*.py, so the
output of py.test becomes shorter (but wider with more dots at each filename)
- test coverage is now 53% (but of course stuff is still skipped, it was before changes
to test_attribute_analyzer was change 74%, why this decreased is unclear to me)

- include tests for test_attribute_analyzer for which result is same for
combinations of hidden and remove
- include some of the other tests from test_attribute_analyzer

Next step:
- remove skips -> complete coverage