aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorCezar Pendarovski2014-08-25 17:28:22 +0200
committerCezar Pendarovski2014-08-25 17:28:22 +0200
commitf6cbd88618553c394b5c62761ec1506e903de267 (patch)
tree6e557dbb3ccb2ce7f864efe78658ca2a44937282 /setup.py
parent4d582fd9ffcb6ec28247e95b63134c00cc131780 (diff)
parent21a0a826bba3df01e72ea8b0390e05d50cf9a854 (diff)
downloaddjango-rest-framework-f6cbd88618553c394b5c62761ec1506e903de267.tar.bz2
Merge remote-tracking branch 'upstream/master' into fix-1719
Conflicts: rest_framework/templates/rest_framework/base.html
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 78cdb628..2c56cd75 100755
--- a/setup.py
+++ b/setup.py
@@ -2,11 +2,26 @@
# -*- coding: utf-8 -*-
from setuptools import setup
+from setuptools.command.test import test as TestCommand
import re
import os
import sys
+# This command has been borrowed from
+# https://github.com/getsentry/sentry/blob/master/setup.py
+class PyTest(TestCommand):
+ def finalize_options(self):
+ TestCommand.finalize_options(self)
+ self.test_args = ['tests']
+ self.test_suite = True
+
+ def run_tests(self):
+ import pytest
+ errno = pytest.main(self.test_args)
+ sys.exit(errno)
+
+
def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
@@ -62,7 +77,7 @@ setup(
author_email='tom@tomchristie.com', # SEE NOTE BELOW (*)
packages=get_packages('rest_framework'),
package_data=get_package_data('rest_framework'),
- test_suite='rest_framework.runtests.runtests.main',
+ cmdclass={'test': PyTest},
install_requires=[],
classifiers=[
'Development Status :: 5 - Production/Stable',