[python-docker-py] run mock unit tests
Tomas Tomecek
ttomecek at fedoraproject.org
Fri Mar 13 06:17:31 UTC 2015
commit 46de211a8923ef4efd0c7ed66267ea81f8af5a38
Author: Tomas Tomecek <ttomecek at redhat.com>
Date: Fri Mar 13 07:13:23 2015 +0100
run mock unit tests
python-docker-py.spec | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/python-docker-py.spec b/python-docker-py.spec
index 3bcf65c..22fd01f 100644
--- a/python-docker-py.spec
+++ b/python-docker-py.spec
@@ -18,6 +18,7 @@ BuildRequires: python-setuptools
BuildRequires: python-tools
BuildRequires: python-websocket-client >= 0.11.0
BuildRequires: python-coverage >= 3.7.1
+BuildRequires: python-mock
%if 0%{?with_python3}
BuildRequires: python3-devel
@@ -26,6 +27,7 @@ BuildRequires: python3-setuptools
BuildRequires: python3-requests
BuildRequires: python3-websocket-client >= 0.11.0
BuildRequires: python3-coverage >= 3.7.1
+BuildRequires: python3-mock
%endif # with_python3
%if 0%{?fedora} >= 21
@@ -83,7 +85,16 @@ popd
%endif # with_python3
%check
-[ ! -e /run/docker.sock ] || make test
+PYTHONPATH="${PWD}" %{__python} tests/test.py
+PYTHONPATH="${PWD}" %{__python} tests/utils_test.py
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+PYTHONPATH="${PWD}" %{__python3} tests/test.py
+PYTHONPATH="${PWD}" %{__python3} tests/utils_test.py
+popd
+%endif # with_python3
+
%files
%doc LICENSE README.md
More information about the scm-commits
mailing list