praw-dev/praw — pull request #209 by Damgaard (2013-04-18 03:13:20+00:00)
Title: Pytest

The reorganization of the test suite from one big file into many smaller and a switch from unittest to pytest.

Alongside these two big changes, a number of smaller bugs in the test suite has been fixed and a few optimizations has been added. But overall, the files look a lot like they did when they were classes in the big test file.

Running setup.py test will run the test suite as per usual and this has been tested with both 2.7 and 3.3.

Surprisingly, these changes increased the line count. This comes from having to add the license to 26 files instead of 1 and pylint needing 2 lines between base level objects compared to only needing 1 line between a class methods.

I think it would be a good idea if some of the files were combined, some of the files only have a single test. One solution that wouldn't require too much refactoring is to combine all the comments classes into one, all the moderator classes into one and finally all the submission classes into one. This would eliminate 7 files.

I've left the docstring unchanged in the helper file for now. I'm not sure whether to remove it or add docstrings to all test files, with a small description of what to put into the test file.

Overall I want to say that having worked with this new test structure lately, it seems much more efficient and comparing groups of tests is much simpler.