Permalink
Browse files

Use ``pytest-runner`` for ``setuptools`` integration

  • Loading branch information...
1 parent b81cedf commit 7c28f99da47505442ed72fa07734ba0f97a18f7e @superbobry superbobry committed Jan 10, 2016
Showing with 3 additions and 18 deletions.
  1. +2 −0 setup.cfg
  2. +1 −18 setup.py
View
@@ -0,0 +1,2 @@
+[aliases]
+test=pytest
View
@@ -2,10 +2,8 @@
# -*- coding: utf-8 -*-
import os
-import sys
from setuptools import setup
-from setuptools.command.test import test as TestCommand
here = os.path.abspath(os.path.dirname(__file__))
@@ -32,26 +30,11 @@
]
-class PyTest(TestCommand):
- """Unfortunately :mod:`setuptools` support only :mod:`unittest`
- based tests, thus, we have to overider build-in ``test`` command
- to run :mod:`pytest`.
- """
- def finalize_options(self):
- TestCommand.finalize_options(self)
- self.test_args = []
- self.test_suite = True
-
- def run_tests(self):
- import pytest
- sys.exit(pytest.main(self.test_args + ["./tests"]))
-
-
setup(name="pyte",
version="0.5.1",
packages=["pyte"],
install_requires=["wcwidth"],
- cmdclass={"test": PyTest},
+ setup_requires=["pytest-runner"],
tests_require=["pytest"],
platforms=["any"],

0 comments on commit 7c28f99

Please sign in to comment.