PEP8 fixes in run_tests.py and test_compile.py.

This commit is contained in:
Paul Romano 2013-09-21 16:48:47 -04:00
parent 60168dffc7
commit c67423342e
2 changed files with 31 additions and 14 deletions

View file

@ -87,11 +87,11 @@ if len(sys.argv) > 1:
if i == 'all-tests':
tests__ = tests
try:
idx = tests_.index('compile') # check for compile test
idx = tests_.index('compile') # check for compile test
except ValueError:
del tests__[0]
finally:
break # don't need to check for anything else
break # don't need to check for anything else
# This checks for any subsets of tests. The string after
# all-XXXX will be used to search through all tests.
@ -109,7 +109,7 @@ if len(sys.argv) > 1:
if j.rfind(suffix) != -1:
tests__.append(j)
else:
tests__.append(i) # append specific test (e.g., mpi-debug)
tests__.append(i) # append specific test (e.g., mpi-debug)
tests = tests__ if tests__ else tests
# Run tests

View file

@ -59,18 +59,21 @@ def test_mpi():
assert returncode == 0
shutil.move('openmc', 'openmc-mpi')
def test_mpi_debug():
returncode = run(['make','distclean'])
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'DEBUG=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-mpi-debug')
def test_mpi_optimize():
returncode = run(['make','distclean'])
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'OPTIMIZE=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-mpi-optimize')
def test_omp():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'OPENMP=yes'])
@ -84,36 +87,43 @@ def test_hdf5():
assert returncode == 0
shutil.move('openmc', 'openmc-hdf5')
def test_hdf5_debug():
returncode = run(['make','distclean'])
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'HDF5=yes', 'DEBUG=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-hdf5-debug')
def test_hdf5_optimize():
returncode = run(['make','distclean'])
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'HDF5=yes', 'OPTIMIZE=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-hdf5-optimize')
def test_petsc():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'PETSC=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-petsc')
def test_petsc_debug():
returncode = run(['make','distclean'])
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'PETSC=yes', 'DEBUG=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-petsc-debug')
def test_petsc_optimize():
returncode = run(['make','distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'PETSC=yes', 'OPTIMIZE=yes'])
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'PETSC=yes',
'OPTIMIZE=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-petsc-optimize')
def test_mpi_omp():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'OPENMP=yes'])
@ -127,36 +137,43 @@ def test_omp_hdf5():
assert returncode == 0
shutil.move('openmc', 'openmc-omp-hdf5')
def test_mpi_hdf5():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'HDF5=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-phdf5')
def test_mpi_hdf5_debug():
returncode = run(['make','distclean'])
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'HDF5=yes', 'DEBUG=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-phdf5-debug')
def test_mpi_hdf5_optimize():
returncode = run(['make','distclean'])
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'HDF5=yes', 'OPTIMIZE=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-phdf5-optimize')
def test_mpi_hdf5_petsc():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'HDF5=yes', 'PETSC=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-phdf5-petsc')
def test_mpi_hdf5_petsc_debug():
returncode = run(['make','distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'HDF5=yes', 'PETSC=yes', 'DEBUG=yes'])
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'HDF5=yes', 'PETSC=yes',
'DEBUG=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-phdf5-petsc-debug')
def test_mpi_hdf5_petsc_optimize():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'HDF5=yes', 'PETSC=yes',