Test running improvements #9

Merged
merged 2 commits into from Apr 10, 2012

2 participants

@kmike

Tests can be run under python 2.6 (by using optional unittest2), tox config for testing under different pythons, explicit python version requirements (factory_boy works with python 2.6 and 2.7); ./setup.py test returns proper error code in case of test failure.

@kmike kmike Test running improvements: tests can be run under python 2.6 (by usin…
…g optional unittest2), tox config for testing under different pythons, explicit python version requirements (factory_boy works with python 2.6 and 2.7); ./setup.py test returns proper error code in case of test failure.
af00973
@rbarrois rbarrois and 1 other commented on an outdated diff Apr 10, 2012
@@ -34,7 +39,9 @@ def run(self):
suite = unittest.TestLoader().loadTestsFromName(self.test_suite)
- unittest.TextTestRunner(verbosity=verbosity).run(suite)
+ result = unittest.TextTestRunner(verbosity=verbosity).run(suite)
+ if (not result.wasSuccessful()):
@rbarrois
The FactoryBoy Python project member
rbarrois added a line comment Apr 10, 2012

No need to add brackets here

@kmike
kmike added a line comment Apr 10, 2012

agree.

@kmike
kmike added a line comment Apr 10, 2012

By the way, isn't it better to switch to nose and remove custom ./setup.py test ? This way proper return values & code coverage will be given for free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rbarrois rbarrois commented on the diff Apr 10, 2012
@@ -0,0 +1,11 @@
+[tox]
@rbarrois
The FactoryBoy Python project member
rbarrois added a line comment Apr 10, 2012

Could you add a short comment pointing to tox docs (http://tox.readthedocs.org/en/latest/) for users unfamiliar with tox?

@kmike
kmike added a line comment Apr 10, 2012

How do you think, what is the best place for this? I can't find any development docs for factory_boy (how to contribute, how to run tests). Travis CI is also undocumented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@kmike

Changes from this pull request are also in #10

@rbarrois rbarrois merged commit 223c31c into FactoryBoy:master Apr 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment