Run flake8 and nose as modules

Running flake8 and nose as modules in run_tests.py make sure that we start
these tools with the same Python as the one executing the script.
This commit is contained in:
micbou 2017-09-10 11:59:43 +02:00
parent dd1cb5abdb
commit 750d3e5ecc
No known key found for this signature in database
GPG Key ID: C7E8FD1F3BDA1E05

View File

@ -38,7 +38,9 @@ import argparse
def RunFlake8():
print( 'Running flake8' )
subprocess.check_call( [
'flake8',
sys.executable,
# __main__ is required on Python 2.6.
'-m', 'flake8.__main__',
p.join( DIR_OF_THIS_SCRIPT, 'python' )
] )
@ -84,7 +86,9 @@ def NoseTests( parsed_args, extra_nosetests_args ):
else:
nosetests_args.append( p.join( DIR_OF_THIS_SCRIPT, 'python' ) )
subprocess.check_call( [ 'nosetests' ] + nosetests_args )
subprocess.check_call( [ sys.executable,
# __main__ is required on Python 2.6.
'-m', 'nose.__main__' ] + nosetests_args )
def Main():