@ -20,7 +20,7 @@ from setuptools import setup, find_packages
from setuptools . command . test import test as TestCommand
from setuptools . command . test import test as TestCommand
class Tox ( TestCommand ) :
class PyTest ( TestCommand ) :
def finalize_options ( self ) :
def finalize_options ( self ) :
TestCommand . finalize_options ( self )
TestCommand . finalize_options ( self )
@ -29,8 +29,9 @@ class Tox(TestCommand):
def run_tests ( self ) :
def run_tests ( self ) :
#import here, cause outside the eggs aren't loaded
#import here, cause outside the eggs aren't loaded
import tox
import pytest
errcode = tox . cmdline ( self . test_args )
#errcode = tox.cmdline(self.test_args)
errcode = pytest . main ( self . test_args )
sys . exit ( errcode )
sys . exit ( errcode )
setup (
setup (
@ -38,8 +39,8 @@ setup(
version = __import__ ( " gns3server " ) . __version__ ,
version = __import__ ( " gns3server " ) . __version__ ,
url = " http://github.com/GNS3/gns3-server " ,
url = " http://github.com/GNS3/gns3-server " ,
license = " GNU General Public License v3 (GPLv3) " ,
license = " GNU General Public License v3 (GPLv3) " ,
tests_require = [ " tox " ] ,
tests_require = [ " pytest " ] ,
cmdclass = { " test " : Tox } ,
cmdclass = { " test " : PyTest } ,
author = " Jeremy Grossmann " ,
author = " Jeremy Grossmann " ,
author_email = " package-maintainer@gns3.net " ,
author_email = " package-maintainer@gns3.net " ,
description = " GNS3 server to asynchronously manage emulators " ,
description = " GNS3 server to asynchronously manage emulators " ,