aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Masood Malekghassemi <soltanmm@users.noreply.github.com>2015-07-28 17:39:02 -0700
committerGravatar Masood Malekghassemi <soltanmm@users.noreply.github.com>2015-07-31 14:13:11 -0700
commit2b84162bd4a515926635eb558da0207150590874 (patch)
treebbb86e52b921dde757f5d731ade00165e67c4bc7 /src
parent791cc31a4971b0b77627044ef375e78b113475fb (diff)
Use py.test from run_tests.py
Also updates the version of grpcio_test. Now that grpcio and its tests are in different project packages, the version numbers should be kept in sync.
Diffstat (limited to 'src')
-rw-r--r--src/python/grpcio/MANIFEST.in1
-rw-r--r--src/python/grpcio/requirements.txt (renamed from src/python/requirements.txt)0
-rw-r--r--src/python/grpcio_test/MANIFEST.in1
-rw-r--r--src/python/grpcio_test/commands.py4
-rw-r--r--src/python/grpcio_test/requirements.txt5
-rw-r--r--src/python/grpcio_test/setup.py29
6 files changed, 28 insertions, 12 deletions
diff --git a/src/python/grpcio/MANIFEST.in b/src/python/grpcio/MANIFEST.in
index 498b55f20a..9583dc7768 100644
--- a/src/python/grpcio/MANIFEST.in
+++ b/src/python/grpcio/MANIFEST.in
@@ -1,2 +1,3 @@
graft grpc
include commands.py
+include requirements.txt
diff --git a/src/python/requirements.txt b/src/python/grpcio/requirements.txt
index 43395df03b..43395df03b 100644
--- a/src/python/requirements.txt
+++ b/src/python/grpcio/requirements.txt
diff --git a/src/python/grpcio_test/MANIFEST.in b/src/python/grpcio_test/MANIFEST.in
index 66bb3c6f17..c9327307dc 100644
--- a/src/python/grpcio_test/MANIFEST.in
+++ b/src/python/grpcio_test/MANIFEST.in
@@ -1,3 +1,4 @@
graft grpc_interop
graft grpc_test
include commands.py
+include requirements.txt
diff --git a/src/python/grpcio_test/commands.py b/src/python/grpcio_test/commands.py
index 24d6241c43..c796d94c76 100644
--- a/src/python/grpcio_test/commands.py
+++ b/src/python/grpcio_test/commands.py
@@ -52,4 +52,6 @@ class RunTests(setuptools.Command):
# We import here to ensure that setup.py has had a chance to install the
# relevant package eggs first.
import pytest
- pytest.main(self.pytest_args)
+ result = pytest.main(self.pytest_args)
+ if result != 0:
+ raise SystemExit(result)
diff --git a/src/python/grpcio_test/requirements.txt b/src/python/grpcio_test/requirements.txt
new file mode 100644
index 0000000000..856198def5
--- /dev/null
+++ b/src/python/grpcio_test/requirements.txt
@@ -0,0 +1,5 @@
+pytest>=2.6
+pytest-cov>=2.0
+pytest-xdist>=1.11
+oauth2client>=1.4.7
+grpcio>=0.10.0a0
diff --git a/src/python/grpcio_test/setup.py b/src/python/grpcio_test/setup.py
index 798710393d..925c32720f 100644
--- a/src/python/grpcio_test/setup.py
+++ b/src/python/grpcio_test/setup.py
@@ -52,21 +52,28 @@ _PACKAGE_DATA = {
'credentials/server1.pem',]
}
-_INSTALL_REQUIRES = ['oauth2client>=1.4.7', 'grpcio>=0.10.0a0']
+_SETUP_REQUIRES = (
+ 'pytest>=2.6',
+ 'pytest-cov>=2.0',
+ 'pytest-xdist>=1.11',
+)
+
+_INSTALL_REQUIRES = (
+ 'oauth2client>=1.4.7',
+ 'grpcio>=0.10.0a0',
+)
+
+_COMMAND_CLASS = {
+ 'test': commands.RunTests
+}
setuptools.setup(
name='grpcio_test',
- version='0.0.1',
+ version='0.10.0a0',
packages=_PACKAGES,
package_dir=_PACKAGE_DIRECTORIES,
package_data=_PACKAGE_DATA,
- install_requires=_INSTALL_REQUIRES,
- setup_requires=(
- 'pytest>=2.6',
- 'pytest-cov>=2.0',
- 'pytest-xdist>=1.11',
- ),
- cmdclass={
- 'test': commands.RunTests
- }
+ install_requires=_INSTALL_REQUIRES + _SETUP_REQUIRES,
+ setup_requires=_SETUP_REQUIRES,
+ cmdclass=_COMMAND_CLASS
)