summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatus Valo <matusvalo@gmail.com>2018-01-21 14:40:49 -0800
committerMatus Valo <matusvalo@gmail.com>2018-01-21 14:48:47 -0800
commit02d5e0a7aeb38fc60b82d40dc1bd6e5d396a4a32 (patch)
tree068a813a5d8200ad3054738f2c026ebab91a0467
parentad09baa74c3a921428426ccdf525b7c4c64bbc0b (diff)
downloadlibrabbitmq-02d5e0a7aeb38fc60b82d40dc1bd6e5d396a4a32.tar.gz
Unittests can be run directly without installation of library
Unittests are now migrated from nose to python standard unittests runner and Makefile calls tests directly from setup.py. This enables running tests without installation in system.
-rw-r--r--Makefile9
-rw-r--r--funtests/setup.py2
-rw-r--r--requirements/test-ci.txt3
-rw-r--r--requirements/test.txt1
-rw-r--r--setup.py2
-rw-r--r--tests/__init__.py (renamed from librabbitmq/tests/__init__.py)0
-rw-r--r--tests/test_functional.py (renamed from librabbitmq/tests/test_functional.py)0
7 files changed, 10 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 537d65c..659888a 100644
--- a/Makefile
+++ b/Makefile
@@ -80,11 +80,12 @@ flakeplusdiag:
flakes: flakediag flakeplusdiag
-test:
- nosetests -xv librabbitmq.tests
+test: build
+ python setup.py test
-cov:
- nosetests -xv librabbitmq.tests --with-coverage --cover-html --cover-branch
+cov: build
+ coverage run --source=librabbitmq setup.py test
+ coverage report
removepyc:
-find . -type f -a \( -name "*.pyc" -o -name "*$$py.class" \) | xargs rm
diff --git a/funtests/setup.py b/funtests/setup.py
index 5116dd6..8f0ae22 100644
--- a/funtests/setup.py
+++ b/funtests/setup.py
@@ -41,7 +41,7 @@ setup(
data_files=[],
zip_safe=False,
cmdclass={"install": no_install},
- test_suite="nose.collector",
+ test_suite="tests",
build_requires=[
"nose",
"nose-cover3",
diff --git a/requirements/test-ci.txt b/requirements/test-ci.txt
index a096a8c..62149e6 100644
--- a/requirements/test-ci.txt
+++ b/requirements/test-ci.txt
@@ -1 +1,4 @@
+mock
+six>=1.0.0
+amqp>=1.4.6
coverage>=3.0
diff --git a/requirements/test.txt b/requirements/test.txt
index 1f4031d..43c1ff5 100644
--- a/requirements/test.txt
+++ b/requirements/test.txt
@@ -1,3 +1,2 @@
-nose
mock
six
diff --git a/setup.py b/setup.py
index 0b94c10..ec00de9 100644
--- a/setup.py
+++ b/setup.py
@@ -211,7 +211,7 @@ setup(
license='MPL',
description='AMQP Client using the rabbitmq-c library.',
long_description=long_description,
- test_suite='nose.collector',
+ test_suite="tests",
zip_safe=False,
packages=packages,
cmdclass=cmdclass,
diff --git a/librabbitmq/tests/__init__.py b/tests/__init__.py
index e69de29..e69de29 100644
--- a/librabbitmq/tests/__init__.py
+++ b/tests/__init__.py
diff --git a/librabbitmq/tests/test_functional.py b/tests/test_functional.py
index 03d6276..03d6276 100644
--- a/librabbitmq/tests/test_functional.py
+++ b/tests/test_functional.py