From 3e295cc13c5fb89cc5daacc291aa836becbedfbf Mon Sep 17 00:00:00 2001 From: Anton Beloglazov Date: Thu, 26 Jul 2012 10:57:23 +1000 Subject: [PATCH] Fixed setup.py to use the setup.py test command --- setup.py | 1 + tests/__init__.py | 3 --- tests/test_collector.py | 11 +++++------ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index 8951e19..a388984 100644 --- a/setup.py +++ b/setup.py @@ -20,5 +20,6 @@ setup( platforms='any', packages=find_packages(), + test_suite='tests', tests_require=['pyqcy'], ) diff --git a/tests/__init__.py b/tests/__init__.py index f063653..e69de29 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,3 +0,0 @@ -from pyqcy import TestCase - -TestCase.__test__ = False diff --git a/tests/test_collector.py b/tests/test_collector.py index 6ffd73e..2e30d01 100644 --- a/tests/test_collector.py +++ b/tests/test_collector.py @@ -4,9 +4,8 @@ from pyqcy import * class Arithmetic(TestCase): @qc - def addition_on_ints(x=int, y=int): - assert isinstance(x + y, int) - - @qc - def subtraction_on_ints(x=int, y=int): - assert isinstance(x - y, int) + def addition_actually_works( + x=int_(min=0), y=int_(min=0) + ): + the_sum = x + y + assert the_sum >= x and the_sum >= y