From 1b734f1e45f2c1447a9e3c6b414cf8a9402910e0 Mon Sep 17 00:00:00 2001 From: lguohan Date: Fri, 22 Mar 2019 02:59:35 -0700 Subject: [PATCH] use pytest in setuptools (#490) --- setup.cfg | 2 ++ setup.py | 10 ++++------ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000000..b7e478982c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[aliases] +test=pytest diff --git a/setup.py b/setup.py index ba1040f62e..971f9f07f1 100644 --- a/setup.py +++ b/setup.py @@ -16,12 +16,6 @@ import glob from setuptools import setup -import unittest - -def get_test_suite(): - test_loader = unittest.TestLoader() - test_suite = test_loader.discover('sonic-utilities-tests', pattern='*.py') - return test_suite setup( name='sonic-utilities', @@ -125,7 +119,11 @@ def get_test_suite(): 'click', 'natsort' ], + setup_requires= [ + 'pytest-runner' + ], tests_require = [ + 'pytest', 'mock>=2.0.0', 'mockredispy>=2.9.3' ],