summaryrefslogtreecommitdiff
path: root/tests/test_declarations.py
diff options
context:
space:
mode:
authorMikhail Korobov <kmike84@gmail.com>2012-04-10 10:58:14 +0600
committerMikhail Korobov <kmike84@gmail.com>2012-04-10 10:58:14 +0600
commitaf00973f82337a24aeececa2244ea3fc532db6d2 (patch)
tree8fb43d6b3fc60f5d651e0490b5f16219d5337cb1 /tests/test_declarations.py
parente80cbdc3224297ee57667e4000f1a671af05f520 (diff)
downloadfactory-boy-af00973f82337a24aeececa2244ea3fc532db6d2.tar
factory-boy-af00973f82337a24aeececa2244ea3fc532db6d2.tar.gz
Test running improvements: 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.
Diffstat (limited to 'tests/test_declarations.py')
-rw-r--r--tests/test_declarations.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_declarations.py b/tests/test_declarations.py
index 7215a54..3960670 100644
--- a/tests/test_declarations.py
+++ b/tests/test_declarations.py
@@ -20,7 +20,10 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-import unittest
+try:
+ import unittest2 as unittest
+except ImportError:
+ import unittest
from factory.declarations import deepgetattr, OrderedDeclaration, Sequence