Skip to content

Commit 1b734f1

Browse files
authored
use pytest in setuptools (sonic-net#490)
1 parent 7030c97 commit 1b734f1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

setup.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[aliases]
2+
test=pytest

setup.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616

1717
import glob
1818
from setuptools import setup
19-
import unittest
20-
21-
def get_test_suite():
22-
test_loader = unittest.TestLoader()
23-
test_suite = test_loader.discover('sonic-utilities-tests', pattern='*.py')
24-
return test_suite
2519

2620
setup(
2721
name='sonic-utilities',
@@ -125,7 +119,11 @@ def get_test_suite():
125119
'click',
126120
'natsort'
127121
],
122+
setup_requires= [
123+
'pytest-runner'
124+
],
128125
tests_require = [
126+
'pytest',
129127
'mock>=2.0.0',
130128
'mockredispy>=2.9.3'
131129
],

0 commit comments

Comments
 (0)