1414# limitations under the License.
1515
1616from setuptools import setup
17- from setuptools . command . test import test as TestCommand
17+
1818import os
1919import sys
2020import pkg_resources
3838 os .system ('python setup.py sdist upload -r pypi' )
3939 sys .exit ()
4040
41- class PyTest (TestCommand ):
42- def finalize_options (self ):
43- TestCommand .finalize_options (self )
44- self .test_args = ['--strict' , '--verbose' , '--tb=long' , 'test' ]
45- self .test_suite = True
46-
47- def run_tests (self ):
48- import pytest
49- errcode = pytest .main (self .test_args )
50- sys .exit (errcode )
51-
52- class PyTestUnit (PyTest ):
53- def finalize_options (self ):
54- self .test_args = ['--strict' , '--verbose' , '--tb=long' , 'test/unit' ]
55-
56-
57- class PyTestIntegration (PyTest ):
58- def finalize_options (self ):
59- self .test_args = ['--strict' , '--verbose' , '--tb=long' , 'test/integration' ]
60-
6141with open ("README.md" , "r" ) as fh :
6242 readme = fh .read ()
6343
@@ -67,7 +47,6 @@ def finalize_options(self):
6747 license = 'Apache 2.0' ,
6848 install_requires = install_requires ,
6949 tests_require = tests_require ,
70- cmdclass = {'test' : PyTest , 'test_unit' : PyTestUnit , 'test_integration' : PyTestIntegration },
7150 author = 'IBM' ,
7251 long_description = readme ,
7352 long_description_content_type = 'text/markdown' ,
0 commit comments