Enable Python testing and coverage
diff --git a/src/python/grpcio_test/setup.py b/src/python/grpcio_test/setup.py
index 3f57ef0..7987103 100644
--- a/src/python/grpcio_test/setup.py
+++ b/src/python/grpcio_test/setup.py
@@ -29,8 +29,17 @@
"""A setup module for the GRPC Python interop testing package."""
+import os
+import os.path
+
import setuptools
+# Ensure we're in the proper directory whether or not we're being used by pip.
+os.chdir(os.path.dirname(os.path.abspath(__file__)))
+
+# Break import-style to ensure we can actually find our commands module.
+import commands
+
_PACKAGES = setuptools.find_packages('.', exclude=['*._cython', '*._cython.*'])
_PACKAGE_DIRECTORIES = {
@@ -51,5 +60,13 @@
packages=_PACKAGES,
package_dir=_PACKAGE_DIRECTORIES,
package_data=_PACKAGE_DATA,
- install_requires=_INSTALL_REQUIRES
+ install_requires=_INSTALL_REQUIRES,
+ setup_requires=(
+ 'pytest>=2.6',
+ 'pytest-cov>=2.0',
+ 'pytest-xdist>=1.11',
+ ),
+ cmdclass={
+ 'test': commands.RunTests
+ }
)