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:
parent
dd1cb5abdb
commit
750d3e5ecc
@ -38,7 +38,9 @@ import argparse
|
|||||||
def RunFlake8():
|
def RunFlake8():
|
||||||
print( 'Running flake8' )
|
print( 'Running flake8' )
|
||||||
subprocess.check_call( [
|
subprocess.check_call( [
|
||||||
'flake8',
|
sys.executable,
|
||||||
|
# __main__ is required on Python 2.6.
|
||||||
|
'-m', 'flake8.__main__',
|
||||||
p.join( DIR_OF_THIS_SCRIPT, 'python' )
|
p.join( DIR_OF_THIS_SCRIPT, 'python' )
|
||||||
] )
|
] )
|
||||||
|
|
||||||
@ -84,7 +86,9 @@ def NoseTests( parsed_args, extra_nosetests_args ):
|
|||||||
else:
|
else:
|
||||||
nosetests_args.append( p.join( DIR_OF_THIS_SCRIPT, 'python' ) )
|
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():
|
def Main():
|
||||||
|
Loading…
Reference in New Issue
Block a user