Deduplicate test requirements 00/12400/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 27 Aug 2018 02:43:02 +0000 (22:43 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 27 Aug 2018 02:48:05 +0000 (22:48 -0400)
Some of these tests being pulled in are duplicates. Let's consolidate
into requirements-test.txt as the source of truth.

Change-Id: I2481a364b9ddf2aa0ba9e2168d4ee408ca477c43
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
setup.py
tox.ini

index 79877a5..8e5aefb 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -17,6 +17,10 @@ from setuptools import setup
 with open('requirements.txt') as f:
     install_reqs = f.read().splitlines()
 
+with open('requirements-test.txt') as f:
+    f.readline()  # Skip the first -rrequirements.txt line
+    test_reqs = f.read().splitlines()
+
 setup(
     setup_requires=['pbr', 'pytest-runner'],
     pbr=True,
@@ -27,5 +31,5 @@ setup(
         'tests.*',
         'tests'
     ]),
-    tests_require=['pytest'],
+    tests_require=test_reqs,
 )
diff --git a/tox.ini b/tox.ini
index d62ad0e..669343a 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -10,12 +10,7 @@ envlist =
     py3
 
 [testenv]
-deps =
-    -r{toxinidir}/requirements.txt
-    -r{toxinidir}/requirements-test.txt
-    pytest
-    pytest-click
-    pytest-datafiles
+deps = -r{toxinidir}/requirements-test.txt
 commands = pytest
 
 [testenv:check-hooks]