diff --git a/openmc/tallies.py b/openmc/tallies.py index 59dd03dde4..512e93c9a7 100644 --- a/openmc/tallies.py +++ b/openmc/tallies.py @@ -651,7 +651,7 @@ class Tally(object): Raises ------ - KeyError : An error when the argument passed to the 'nuclide' + KeyError : An error when the argument passed to the 'nuclide' parameter cannot be found in the Tally. """ @@ -694,7 +694,7 @@ class Tally(object): Raises ------ - ValueError: An error when the argument passed to the 'score' + ValueError: An error when the argument passed to the 'score' parameter cannot be found in the Tally. """ @@ -816,7 +816,7 @@ class Tally(object): self.get_filter_index(filter.type, bin)) # Apply cross-product sum between all filter bin indices - filter_indices = map(sum, itertools.product(*filter_indices)) + filter_indices = list(map(sum, itertools.product(*filter_indices))) # If user did not specify any specific Filters, use them all else: @@ -874,7 +874,7 @@ class Tally(object): This routine constructs a Pandas DataFrame object for the Tally data with columns annotated by filter, nuclide and score bin information. This capability has been tested for Pandas >=v0.13.1. However, if p - possible, it is recommended to use the v0.16 or newer versions of + possible, it is recommended to use the v0.16 or newer versions of Pandas since this this routine uses the Multi-index Pandas feature. Parameters @@ -951,7 +951,7 @@ class Tally(object): # Append Mesh ID as outermost index of mult-index mesh_id = filter.mesh.id - mesh_key = 'mesh {0}'.format(mesh_id) + mesh_key = 'mesh {0}'.format(mesh_id) # Find mesh dimensions - use 3D indices for simplicity if (len(filter.mesh.dimension) == 3): @@ -1013,8 +1013,8 @@ class Tally(object): # offsets to OpenCG LocalCoords linked lists offsets_to_coords = {} - # Use OpenCG to compute LocalCoords linked list for - # each region and store in dictionary + # Use OpenCG to compute LocalCoords linked list for + # each region and store in dictionary for region in range(num_regions): coords = opencg_geometry.findRegion(region) path = opencg.get_path(coords) @@ -1023,7 +1023,7 @@ class Tally(object): # If this region is in Cell corresponding to the # distribcell filter bin, store it in dictionary if cell_id == filter.bins[0]: - offset = openmc_geometry.get_offset(path, + offset = openmc_geometry.get_offset(path, filter.offset) offsets_to_coords[offset] = coords @@ -1053,7 +1053,7 @@ class Tally(object): lat_y_key = (level_key, 'lat', 'y') lat_z_key = (level_key, 'lat', 'z') - # Allocate NumPy arrays for each CSG level and + # Allocate NumPy arrays for each CSG level and # each Multi-index column in the DataFrame level_dict[univ_key] = np.empty(num_offsets) level_dict[cell_key] = np.empty(num_offsets) @@ -1113,9 +1113,9 @@ class Tally(object): tile_factor = data_size / len(level_bins) level_bins = np.tile(level_bins, tile_factor) level_dict[level_key] = level_bins - + # Append the multi-index column to the DataFrame - df = pd.concat([df, pd.DataFrame(level_dict)], + df = pd.concat([df, pd.DataFrame(level_dict)], axis=1) # Create DataFrame column for distribcell instances IDs @@ -1132,7 +1132,7 @@ class Tally(object): bins = filter.bins num_bins = filter.num_bins - # Create strings for + # Create strings for template = '{0:.1e} - {1:.1e}' filter_bins = [] for i in range(num_bins): diff --git a/scripts/openmc-track-to-vtk b/scripts/openmc-track-to-vtk index a2dca34e14..8db57e2a3f 100755 --- a/scripts/openmc-track-to-vtk +++ b/scripts/openmc-track-to-vtk @@ -44,12 +44,12 @@ def main(): if not (fname.endswith('.h5') or fname.endswith('.binary')): raise ValueError("Input file names must either end with '.h5' or" "'.binary'.") - + # Make sure that the output filename ends with '.pvtp'. if not args.out: args.out = 'tracks.pvtp' - elif os.path.splitext(args.out)[1] != '.pvtp': - args.out = ''.join([args.out, '.pvtp']) + elif not args.out.endswith('.pvtp'): + args.out += '.pvtp' # Import HDF library if HDF files are present for fname in args.input: @@ -74,26 +74,28 @@ def main(): coords = h5py.File(fname).get('coordinates') n_points = coords.shape[0] for i in range(n_points): - points.InsertNextPoint(coords[i,:]) - + points.InsertNextPoint(coords[i, :]) + # Create VTK line and assign points to line. line = vtk.vtkPolyLine() line.GetPointIds().SetNumberOfIds(n_points) for i in range(n_points): line.GetPointIds().SetId(i, point_offset+i) - + cells.InsertNextCell(line) point_offset += n_points data = vtk.vtkPolyData() data.SetPoints(points) data.SetLines(cells) - + writer = vtk.vtkXMLPPolyDataWriter() - writer.SetInput(data) + if vtk.vtkVersion.GetVTKMajorVersion() > 5: + writer.SetInputData(data) + else: + writer.SetInput(data) writer.SetFileName(args.out) writer.Write() - if __name__ == '__main__': main() diff --git a/scripts/openmc-voxel-to-silovtk b/scripts/openmc-voxel-to-silovtk index 18488e1c0e..eb052c75fa 100755 --- a/scripts/openmc-voxel-to-silovtk +++ b/scripts/openmc-voxel-to-silovtk @@ -1,120 +1,125 @@ #!/usr/bin/env python2 from __future__ import division, print_function - import struct import sys -################################################################################ + def parse_options(): - """Process command line arguments""" + """Process command line arguments""" - from optparse import OptionParser - usage = r"""%prog [options] """ - p = OptionParser(usage=usage) - p.add_option('-o', '--output', action='store', dest='output', - default='plot', help='Path to output SILO or VTK file.') - p.add_option('-v', '--vtk', action='store_true', dest='vtk', - default=False, help='Flag to convert to VTK instead of SILO.') - parsed = p.parse_args() - if not parsed[1]: - p.print_help() + from optparse import OptionParser + usage = r"""%prog [options] """ + p = OptionParser(usage=usage) + p.add_option('-o', '--output', action='store', dest='output', + default='plot', help='Path to output SILO or VTK file.') + p.add_option('-v', '--vtk', action='store_true', dest='vtk', + default=False, help='Flag to convert to VTK instead of SILO.') + parsed = p.parse_args() + if not parsed[1]: + p.print_help() + return parsed return parsed - return parsed -################################################################################ + def main(file_, o): + print(file_) + fh = open(file_, 'rb') + header = get_header(fh) + meshparms = (header['dimension'] + header['lower_left'] + + header['upper_right']) + nx, ny, nz = meshparms[:3] + ll = header['lower_left'] - print(file_) - fh = open(file_,'rb') - header = get_header(fh) - meshparms = header['dimension'] + header['lower_left'] + header['upper_right'] - nx,ny,nz = meshparms[0], meshparms[1], meshparms[2] - ll = header['lower_left'] + if o.vtk: + try: + import vtk + except: + print('The vtk python bindings do not appear to be installed ' + 'properly.\nOn Ubuntu: sudo apt-get install python-vtk\n' + 'See: http://www.vtk.org/') + return - if o.vtk: - try: - import vtk - except: - print('The vtk python bindings do not appear to be installed properly.\n' - 'On Ubuntu: sudo apt-get install python-vtk\n' - 'See: http://www.vtk.org/') - return + origin = [(l + w*n/2.) for n, l, w in + zip((nx, ny, nz), ll, header['width'])] - origin = [(l+w*n/2.) for n,l,w in zip((nx,ny,nz),ll,header['width'])] + grid = vtk.vtkImageData() + grid.SetDimensions(nx+1, ny+1, nz+1) + grid.SetOrigin(*ll) + grid.SetSpacing(*header['width']) - grid = vtk.vtkImageData() - grid.SetDimensions(nx+1,ny+1,nz+1) - grid.SetOrigin(*ll) - grid.SetSpacing(*header['width']) + data = vtk.vtkDoubleArray() + data.SetName("id") + data.SetNumberOfTuples(nx*ny*nz) + for x in range(nx): + sys.stdout.write(" {0}%\r".format(int(x/nx*100))) + sys.stdout.flush() + for y in range(ny): + for z in range(nz): + i = z*nx*ny + y*nx + x + id_ = get_int(fh)[0] + data.SetValue(i, id_) + grid.GetCellData().AddArray(data) - data = vtk.vtkDoubleArray() - data.SetName("id") - data.SetNumberOfTuples(nx*ny*nz) - for x in range(nx): - sys.stdout.write(" {0}%\r".format(int(x/nx*100))) - sys.stdout.flush() - for y in range(ny): - for z in range(nz): - i = z*nx*ny + y*nx + x - id_ = get_int(fh)[0] - data.SetValue(i, id_) - grid.GetCellData().AddArray(data) + writer = vtk.vtkXMLImageDataWriter() + if vtk.vtkVersion.GetVTKMajorVersion() > 5: + writer.SetInputData(grid) + else: + writer.SetInput(grid) + if not o.output.endswith(".vti"): + o.output += ".vti" + writer.SetFileName(o.output) + writer.Write() - writer = vtk.vtkXMLImageDataWriter() - writer.SetInput(grid) - if not o.output[-4:] == ".vti": o.output += ".vti" - writer.SetFileName(o.output) - writer.Write() + else: + try: + import silomesh + except: + print('The silomesh package does not appear to be installed ' + 'properly.\nSee: https://github.com/nhorelik/silomesh/') + return + if not o.output.endswith(".silo"): + o.output += ".silo" + silomesh.init_silo(o.output) + silomesh.init_mesh('plot', *meshparms) + silomesh.init_var("id") + for x in range(1, nx+1): + sys.stdout.write(" {0}%\r".format(int(x/nx*100))) + sys.stdout.flush() + for y in range(1, ny+1): + for z in range(1, nz+1): + id_ = get_int(fh)[0] + silomesh.set_value(float(id_), x, y, z) + print() + silomesh.finalize_var() + silomesh.finalize_mesh() + silomesh.finalize_silo() - else: - try: - import silomesh - except: - print('The silomesh package does not appear to be installed properly.\n' - 'See: https://github.com/nhorelik/silomesh/') - return - if not o.output[-5:] == ".silo": o.output += ".silo" - silomesh.init_silo(o.output) - silomesh.init_mesh('plot', *meshparms) - silomesh.init_var("id") - for x in range(1,nx+1): - sys.stdout.write(" {0}%\r".format(int(x/nx*100))) - sys.stdout.flush() - for y in range(1,ny+1): - for z in range(1,nz+1): - id_ = get_int(fh)[0] - silomesh.set_value(float(id_), x, y, z) - print() - silomesh.finalize_var() - silomesh.finalize_mesh() - silomesh.finalize_silo() - -################################################################################ def get_header(file_): - nx,ny,nz = get_int(file_, 3) - wx,wy,wz = get_double(file_, 3) - lx,ly,lz = get_double(file_, 3) - header = {'dimension':[nx,ny,nz], 'width':[wx,wy,wz], 'lower_left':[lx,ly,lz], - 'upper_right': [lx+wx*nx,ly+wy*ny,lz+wz*nz]} - return header + nx, ny, nz = get_int(file_, 3) + wx, wy, wz = get_double(file_, 3) + lx, ly, lz = get_double(file_, 3) + header = {'dimension': [nx, ny, nz], 'width': [wx, wy, wz], + 'lower_left': [lx, ly, lz], + 'upper_right': [lx+wx*nx, ly+wy*ny, lz+wz*nz]} + return header + -################################################################################ def get_data(file_, n, typeCode, size): - return list(struct.unpack('={0}{1}'.format(n,typeCode), - file_.read(n*size))) + return list(struct.unpack('={0}{1}'.format(n, typeCode), + file_.read(n*size))) + -################################################################################ def get_int(file_, n=1, path=None): - return get_data(file_, n, 'i', 4) + return get_data(file_, n, 'i', 4) + -################################################################################ def get_double(file_, n=1, path=None): - return get_data(file_, n, 'd', 8) + return get_data(file_, n, 'd', 8) + -################################################################################ if __name__ == '__main__': - (options, args) = parse_options() - if args: - main(args[0],options) + (options, args) = parse_options() + if args: + main(args[0], options) diff --git a/src/fixed_source.F90 b/src/fixed_source.F90 index 78ae3d5a7b..7db6d58fa5 100644 --- a/src/fixed_source.F90 +++ b/src/fixed_source.F90 @@ -126,7 +126,7 @@ contains if (master) call check_triggers() #ifdef MPI call MPI_BCAST(satisfy_triggers, 1, MPI_LOGICAL, 0, & - MPI_COMM_WORLD, mpi_err) + MPI_COMM_WORLD, mpi_err) #endif if (satisfy_triggers .or. & (trigger_on .and. current_batch == n_max_batches)) then @@ -157,6 +157,9 @@ contains ! Copy source attributes to the particle call copy_source_attributes(p, source_site) + ! Determine whether to create track file + if (write_all_tracks) p % write_track = .true. + end subroutine sample_source_particle end module fixed_source diff --git a/src/geometry.F90 b/src/geometry.F90 index 0b31d0cf89..31a9058612 100644 --- a/src/geometry.F90 +++ b/src/geometry.F90 @@ -197,12 +197,6 @@ contains p % coord => p % coord % next p % coord % universe = c % fill - ! Determine all distribcell offsets for this cell level - if (.not. associated(p % coord % mapping)) then - allocate(p % coord % mapping(n_maps)) - end if - p % coord % mapping(:) = c % offset(:) - ! Apply translation if (allocated(c % translation)) then p % coord % xyz = p % coord % xyz - c % translation @@ -259,14 +253,6 @@ contains ! Move particle to next level and search for the lower cells. p % coord => p % coord % next - ! Determine all distribcell offsets for this cell level - if (lat % are_valid_indices(i_xyz)) then - if (.not. associated(p % coord % mapping)) then - allocate(p % coord % mapping(n_maps)) - end if - p % coord % mapping(:) = lat % offset(:, i_xyz(1), i_xyz(2), i_xyz(3)) - end if - call find_cell(p, found) if (.not. found) exit @@ -629,12 +615,6 @@ contains ! Find cell in next lattice element p % coord % universe = lat % universes(i_xyz(1), i_xyz(2), i_xyz(3)) - ! Determine all distribcell offsets for this lattice cell - if (.not. associated(p % coord % mapping)) then - allocate(p % coord % mapping(n_maps)) - end if - p % coord % mapping(:) = lat % offset(:, i_xyz(1), i_xyz(2), i_xyz(3)) - call find_cell(p, found) if (.not. found) then ! In some circumstances, a particle crossing the corner of a cell may @@ -1603,7 +1583,7 @@ contains end if end subroutine handle_lost_particle - + !=============================================================================== ! CALC_OFFSETS calculates and stores the offsets in all fill cells. This ! routine is called once upon initialization. @@ -1630,12 +1610,12 @@ contains offset = 0 do i = 1, n - + cell_index = univ % cells(i) ! get pointer to cell c => cells(cell_index) - + ! ==================================================================== ! AT LOWEST UNIVERSE, TERMINATE SEARCH if (c % type == CELL_NORMAL) then @@ -1664,7 +1644,7 @@ contains select type (lat) type is (RectLattice) - + ! Loop over lattice coordinates do j = 1, lat % n_cells(1) do k = 1, lat % n_cells(2) @@ -1702,9 +1682,9 @@ contains end if end do - + end subroutine calc_offsets - + !=============================================================================== ! COUNT_TARGET recursively totals the numbers of occurances of a given ! universe ID beginning with the universe given. @@ -1744,18 +1724,18 @@ contains count = 0 n = univ % n_cells - + do i = 1, n - + cell_index = univ % cells(i) ! get pointer to cell c => cells(cell_index) - + ! ==================================================================== ! AT LOWEST UNIVERSE, TERMINATE SEARCH if (c % type == CELL_NORMAL) then - + ! ==================================================================== ! CELL CONTAINS LOWER UNIVERSE, RECURSIVELY FIND CELL elseif (c % type == CELL_FILL) then @@ -1767,7 +1747,7 @@ contains count = count + 1 return end if - + count = count + count_target(next_univ, counts, found, goal, map) c => cells(cell_index) @@ -1781,11 +1761,11 @@ contains select type (lat) type is (RectLattice) - + ! Loop over lattice coordinates do j = 1, lat % n_cells(1) do k = 1, lat % n_cells(2) - do m = 1, lat % n_cells(3) + do m = 1, lat % n_cells(3) next_univ => universes(lat % universes(j, k, m)) ! Found target - stop since target cannot contain itself @@ -1793,7 +1773,7 @@ contains count = count + 1 cycle end if - + count = count + & count_target(next_univ, counts, found, goal, map) @@ -1836,7 +1816,7 @@ contains counts(universe_dict % get_key(univ % id), map) = count found(universe_dict % get_key(univ % id), map) = .true. - + end function count_target !=============================================================================== @@ -1859,7 +1839,7 @@ contains n = univ % n_cells do i = 1, n - + cell_index = univ % cells(i) ! get pointer to cell @@ -1869,13 +1849,13 @@ contains ! ==================================================================== ! AT LOWEST UNIVERSE, TERMINATE SEARCH if (c % type == CELL_NORMAL) then - + ! ==================================================================== ! CELL CONTAINS LOWER UNIVERSE, RECURSIVELY FIND CELL elseif (c % type == CELL_FILL) then next_univ => universes(c % fill) - + call count_instance(next_univ) c => cells(cell_index) @@ -1924,7 +1904,7 @@ contains end if end do - + end subroutine count_instance diff --git a/src/input_xml.F90 b/src/input_xml.F90 index 9546d2172f..7d559834a7 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -74,8 +74,8 @@ contains type(Node), pointer :: node_verb => null() type(Node), pointer :: node_res_scat => null() type(Node), pointer :: node_scatterer => null() - type(Node), pointer :: node_trigger => null() - type(Node), pointer :: node_keff_trigger => null() + type(Node), pointer :: node_trigger => null() + type(Node), pointer :: node_keff_trigger => null() type(NodeList), pointer :: node_scat_list => null() ! Display output message @@ -2394,9 +2394,9 @@ contains ! Set type of filter t % filters(j) % type = FILTER_DISTRIBCELL - + ! Going to add new filters to this tally if n_words > 1 - + ! Allocate and store bins allocate(t % filters(j) % int_bins(n_words)) call get_node_array(node_filt, "bins", t % filters(j) % int_bins) @@ -2580,7 +2580,7 @@ contains ! Append default_xs specifier to nuclide if needed if ((default_xs /= '') .and. (.not. ends_with(sarray(j), 'c'))) then - word = word // "." // default_xs + word = trim(word) // "." // default_xs end if ! Search through nuclides @@ -2963,7 +2963,7 @@ contains call fatal_error("No specified on tally " & &// trim(to_str(t % id)) // ".") end if - + ! If settings.xml trigger is turned on, create tally triggers if (trigger_on) then diff --git a/src/particle_header.F90 b/src/particle_header.F90 index 3224d63468..bf03c56356 100644 --- a/src/particle_header.F90 +++ b/src/particle_header.F90 @@ -27,9 +27,6 @@ module particle_header ! Is this level rotated? logical :: rotated = .false. - ! Distributed Mapping Info - integer, pointer :: mapping(:) => null() - ! Pointer to next (more local) set of coordinates type(LocalCoord), pointer :: next => null() end type LocalCoord @@ -104,9 +101,6 @@ contains ! recursively deallocate lower coordinates if (associated(coord % next)) call deallocate_coord(coord%next) - ! deallocate original coordinate - if (associated(coord % mapping)) deallocate(coord % mapping) - ! deallocate this coord deallocate(coord) end if diff --git a/src/tally.F90 b/src/tally.F90 index 47502b5d40..a4fbe01cfd 100644 --- a/src/tally.F90 +++ b/src/tally.F90 @@ -1160,8 +1160,13 @@ contains coord => p % coord0 offset = 0 do while(associated(coord)) - if (associated(coord % mapping)) then - offset = offset + coord % mapping(t % filters(i) % offset) + if (cells(coord % cell) % type == CELL_FILL) then + offset = offset + cells(coord % cell) % & + offset(t % filters(i) % offset) + elseif(cells(coord % cell) % type == CELL_LATTICE) then + offset = offset + lattices(coord % next % lattice) % obj % & + offset(t % filters(i) % offset, coord % next % lattice_x, & + coord % next % lattice_y, coord % next % lattice_z) end if if (t % filters(i) % int_bins(1) == coord % cell) then matching_bins(i) = offset + 1 @@ -1170,7 +1175,7 @@ contains coord => coord % next end do nullify(coord) - + case (FILTER_CELLBORN) ! determine next cellborn bin matching_bins(i) = get_next_bin(FILTER_CELLBORN, & diff --git a/src/track_output.F90 b/src/track_output.F90 index 79a2809066..81faaa5677 100644 --- a/src/track_output.F90 +++ b/src/track_output.F90 @@ -69,10 +69,12 @@ contains // '_' // trim(to_str(current_gen)) // '_' // trim(to_str(p % id)) & // '.binary' #endif +!$omp critical call binout % file_create(fname) length = [3, n_tracks] call binout % write_data(coords, 'coordinates', length=length) call binout % file_close() +!$omp end critical deallocate(coords) end subroutine finalize_particle_track diff --git a/tests/run_tests.py b/tests/run_tests.py index 1679fa5c36..3550ad7cb1 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -121,7 +121,8 @@ class Test(object): self.skipped = False self.valgrind_cmd = "" self.gcov_cmd = "" - self.cmake = ['cmake', '-H..', '-Bbuild'] + self.cmake = ['cmake', '-H..', '-Bbuild', + '-DPYTHON_EXECUTABLE=' + sys.executable] # Check for MPI/HDF5 if self.mpi and not self.hdf5: diff --git a/tests/test_basic/test_basic.py b/tests/test_basic/test_basic.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_basic/test_basic.py +++ b/tests/test_basic/test_basic.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_cmfd_feed/test_cmfd_feed.py b/tests/test_cmfd_feed/test_cmfd_feed.py index 14623a5ee3..0a51dd6f80 100644 --- a/tests/test_cmfd_feed/test_cmfd_feed.py +++ b/tests/test_cmfd_feed/test_cmfd_feed.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -36,7 +37,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.20.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_cmfd_nofeed/test_cmfd_nofeed.py b/tests/test_cmfd_nofeed/test_cmfd_nofeed.py index 34892c53aa..3a1b233ff2 100644 --- a/tests/test_cmfd_nofeed/test_cmfd_nofeed.py +++ b/tests/test_cmfd_nofeed/test_cmfd_nofeed.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -37,7 +38,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.20.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_confidence_intervals/test_confidence_intervals.py b/tests/test_confidence_intervals/test_confidence_intervals.py index d1982f7fae..5c61e70d28 100644 --- a/tests/test_confidence_intervals/test_confidence_intervals.py +++ b/tests/test_confidence_intervals/test_confidence_intervals.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_created_output(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_density_atombcm/test_density_atombcm.py b/tests/test_density_atombcm/test_density_atombcm.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_density_atombcm/test_density_atombcm.py +++ b/tests/test_density_atombcm/test_density_atombcm.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_density_atomcm3/test_density_atomcm3.py b/tests/test_density_atomcm3/test_density_atomcm3.py index 26d389c21e..571f311994 100644 --- a/tests/test_density_atomcm3/test_density_atomcm3.py +++ b/tests/test_density_atomcm3/test_density_atomcm3.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_density_kgm3/test_density_kgm3.py b/tests/test_density_kgm3/test_density_kgm3.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_density_kgm3/test_density_kgm3.py +++ b/tests/test_density_kgm3/test_density_kgm3.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_density_sum/test_density_sum.py b/tests/test_density_sum/test_density_sum.py index b3384291b2..6363a2374c 100644 --- a/tests/test_density_sum/test_density_sum.py +++ b/tests/test_density_sum/test_density_sum.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob('statepoint.10.*') - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_eigenvalue_genperbatch/test_eigenvalue_genperbatch.py b/tests/test_eigenvalue_genperbatch/test_eigenvalue_genperbatch.py index 3ce7bf2db0..2898e8bbc3 100644 --- a/tests/test_eigenvalue_genperbatch/test_eigenvalue_genperbatch.py +++ b/tests/test_eigenvalue_genperbatch/test_eigenvalue_genperbatch.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.7.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_eigenvalue_no_inactive/test_eigenvalue_no_inactive.py b/tests/test_eigenvalue_no_inactive/test_eigenvalue_no_inactive.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_eigenvalue_no_inactive/test_eigenvalue_no_inactive.py +++ b/tests/test_eigenvalue_no_inactive/test_eigenvalue_no_inactive.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_energy_grid/test_energy_grid.py b/tests/test_energy_grid/test_energy_grid.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_energy_grid/test_energy_grid.py +++ b/tests/test_energy_grid/test_energy_grid.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_entropy/test_entropy.py b/tests/test_entropy/test_entropy.py index 2f4196b283..cc153c832f 100644 --- a/tests/test_entropy/test_entropy.py +++ b/tests/test_entropy/test_entropy.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -32,7 +33,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_filter_cell/test_filter_cell.py b/tests/test_filter_cell/test_filter_cell.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_filter_cell/test_filter_cell.py +++ b/tests/test_filter_cell/test_filter_cell.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_filter_cellborn/test_filter_cellborn.py b/tests/test_filter_cellborn/test_filter_cellborn.py index 78132bcfc4..76b1b433e7 100644 --- a/tests/test_filter_cellborn/test_filter_cellborn.py +++ b/tests/test_filter_cellborn/test_filter_cellborn.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_filter_distribcell/test_filter_distribcell.py b/tests/test_filter_distribcell/test_filter_distribcell.py index 3b39af381a..d389bb5a65 100644 --- a/tests/test_filter_distribcell/test_filter_distribcell.py +++ b/tests/test_filter_distribcell/test_filter_distribcell.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -79,7 +80,7 @@ def test_results(): statepoint.append(glob.glob(cwd + '/case-1/statepoint.1.*')) statepoint.append(glob.glob(cwd + '/case-2/statepoint.1.*')) statepoint.append(glob.glob(cwd + '/case-3/statepoint.3.*')) - call(['python', 'results.py', statepoint.pop()[0], statepoint.pop()[0], statepoint.pop()[0]]) + call([sys.executable, 'results.py', statepoint.pop()[0], statepoint.pop()[0], statepoint.pop()[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_filter_energy/test_filter_energy.py b/tests/test_filter_energy/test_filter_energy.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_filter_energy/test_filter_energy.py +++ b/tests/test_filter_energy/test_filter_energy.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_filter_energyout/test_filter_energyout.py b/tests/test_filter_energyout/test_filter_energyout.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_filter_energyout/test_filter_energyout.py +++ b/tests/test_filter_energyout/test_filter_energyout.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_filter_group_transfer/test_filter_group_transfer.py b/tests/test_filter_group_transfer/test_filter_group_transfer.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_filter_group_transfer/test_filter_group_transfer.py +++ b/tests/test_filter_group_transfer/test_filter_group_transfer.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_filter_material/test_filter_material.py b/tests/test_filter_material/test_filter_material.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_filter_material/test_filter_material.py +++ b/tests/test_filter_material/test_filter_material.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_filter_mesh_2d/test_filter_mesh_2d.py b/tests/test_filter_mesh_2d/test_filter_mesh_2d.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_filter_mesh_2d/test_filter_mesh_2d.py +++ b/tests/test_filter_mesh_2d/test_filter_mesh_2d.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_filter_mesh_3d/test_filter_mesh_3d.py b/tests/test_filter_mesh_3d/test_filter_mesh_3d.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_filter_mesh_3d/test_filter_mesh_3d.py +++ b/tests/test_filter_mesh_3d/test_filter_mesh_3d.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_filter_universe/test_filter_universe.py b/tests/test_filter_universe/test_filter_universe.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_filter_universe/test_filter_universe.py +++ b/tests/test_filter_universe/test_filter_universe.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_fixed_source/test_fixed_source.py b/tests/test_fixed_source/test_fixed_source.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_fixed_source/test_fixed_source.py +++ b/tests/test_fixed_source/test_fixed_source.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_infinite_cell/test_infinite_cell.py b/tests/test_infinite_cell/test_infinite_cell.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_infinite_cell/test_infinite_cell.py +++ b/tests/test_infinite_cell/test_infinite_cell.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_lattice/test_lattice.py b/tests/test_lattice/test_lattice.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_lattice/test_lattice.py +++ b/tests/test_lattice/test_lattice.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_lattice_hex/test_lattice_hex.py b/tests/test_lattice_hex/test_lattice_hex.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_lattice_hex/test_lattice_hex.py +++ b/tests/test_lattice_hex/test_lattice_hex.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_lattice_mixed/test_lattice_mixed.py b/tests/test_lattice_mixed/test_lattice_mixed.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_lattice_mixed/test_lattice_mixed.py +++ b/tests/test_lattice_mixed/test_lattice_mixed.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_lattice_multiple/test_lattice_multiple.py b/tests/test_lattice_multiple/test_lattice_multiple.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_lattice_multiple/test_lattice_multiple.py +++ b/tests/test_lattice_multiple/test_lattice_multiple.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_natural_element/test_natural_element.py b/tests/test_natural_element/test_natural_element.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_natural_element/test_natural_element.py +++ b/tests/test_natural_element/test_natural_element.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_output/test_output.py b/tests/test_output/test_output.py index 1ea9e3dbf2..03adf538e8 100644 --- a/tests/test_output/test_output.py +++ b/tests/test_output/test_output.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -41,7 +42,7 @@ def test_statepoint_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_particle_restart_eigval/test_particle_restart_eigval.py b/tests/test_particle_restart_eigval/test_particle_restart_eigval.py index 1aa7035658..6c8016dd27 100644 --- a/tests/test_particle_restart_eigval/test_particle_restart_eigval.py +++ b/tests/test_particle_restart_eigval/test_particle_restart_eigval.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_restart(): def test_results(): particle = glob.glob(os.path.join(cwd, 'particle_12_616.*')) - call(['python', 'results.py', particle[0]]) + call([sys.executable, 'results.py', particle[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_particle_restart_fixed/test_particle_restart_fixed.py b/tests/test_particle_restart_fixed/test_particle_restart_fixed.py index 11ee1fad0c..ee6cfad532 100644 --- a/tests/test_particle_restart_fixed/test_particle_restart_fixed.py +++ b/tests/test_particle_restart_fixed/test_particle_restart_fixed.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_restart(): def test_results(): particle = glob.glob(os.path.join(cwd, 'particle_7_6144.*')) - call(['python', 'results.py', particle[0]]) + call([sys.executable, 'results.py', particle[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_plot_background/test_plot_background.py b/tests/test_plot_background/test_plot_background.py index 92afb9a48a..2330724005 100644 --- a/tests/test_plot_background/test_plot_background.py +++ b/tests/test_plot_background/test_plot_background.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE from optparse import OptionParser diff --git a/tests/test_plot_basis/test_plot_basis.py b/tests/test_plot_basis/test_plot_basis.py index 81d197b50d..680473b512 100644 --- a/tests/test_plot_basis/test_plot_basis.py +++ b/tests/test_plot_basis/test_plot_basis.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE from optparse import OptionParser diff --git a/tests/test_plot_colspec/test_plot_colspec.py b/tests/test_plot_colspec/test_plot_colspec.py index 92afb9a48a..2330724005 100644 --- a/tests/test_plot_colspec/test_plot_colspec.py +++ b/tests/test_plot_colspec/test_plot_colspec.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE from optparse import OptionParser diff --git a/tests/test_plot_mask/test_plot_mask.py b/tests/test_plot_mask/test_plot_mask.py index 81d197b50d..680473b512 100644 --- a/tests/test_plot_mask/test_plot_mask.py +++ b/tests/test_plot_mask/test_plot_mask.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE from optparse import OptionParser diff --git a/tests/test_ptables_off/test_ptables_off.py b/tests/test_ptables_off/test_ptables_off.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_ptables_off/test_ptables_off.py +++ b/tests/test_ptables_off/test_ptables_off.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_reflective_cone/test_reflective_cone.py b/tests/test_reflective_cone/test_reflective_cone.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_reflective_cone/test_reflective_cone.py +++ b/tests/test_reflective_cone/test_reflective_cone.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_reflective_cylinder/test_reflective_cylinder.py b/tests/test_reflective_cylinder/test_reflective_cylinder.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_reflective_cylinder/test_reflective_cylinder.py +++ b/tests/test_reflective_cylinder/test_reflective_cylinder.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_reflective_plane/test_reflective_plane.py b/tests/test_reflective_plane/test_reflective_plane.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_reflective_plane/test_reflective_plane.py +++ b/tests/test_reflective_plane/test_reflective_plane.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_reflective_sphere/test_reflective_sphere.py b/tests/test_reflective_sphere/test_reflective_sphere.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_reflective_sphere/test_reflective_sphere.py +++ b/tests/test_reflective_sphere/test_reflective_sphere.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_resonance_scattering/test_resonance_scattering.py b/tests/test_resonance_scattering/test_resonance_scattering.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_resonance_scattering/test_resonance_scattering.py +++ b/tests/test_resonance_scattering/test_resonance_scattering.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_rotation/test_rotation.py b/tests/test_rotation/test_rotation.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_rotation/test_rotation.py +++ b/tests/test_rotation/test_rotation.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_salphabeta/test_salphabeta.py b/tests/test_salphabeta/test_salphabeta.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_salphabeta/test_salphabeta.py +++ b/tests/test_salphabeta/test_salphabeta.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_salphabeta_multiple/test_salphabeta_multiple.py b/tests/test_salphabeta_multiple/test_salphabeta_multiple.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_salphabeta_multiple/test_salphabeta_multiple.py +++ b/tests/test_salphabeta_multiple/test_salphabeta_multiple.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_MT/test_score_MT.py b/tests/test_score_MT/test_score_MT.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_score_MT/test_score_MT.py +++ b/tests/test_score_MT/test_score_MT.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_absorption/test_score_absorption.py b/tests/test_score_absorption/test_score_absorption.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_score_absorption/test_score_absorption.py +++ b/tests/test_score_absorption/test_score_absorption.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_current/test_score_current.py b/tests/test_score_current/test_score_current.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_score_current/test_score_current.py +++ b/tests/test_score_current/test_score_current.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_events/test_score_events.py b/tests/test_score_events/test_score_events.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_score_events/test_score_events.py +++ b/tests/test_score_events/test_score_events.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_fission/test_score_fission.py b/tests/test_score_fission/test_score_fission.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_score_fission/test_score_fission.py +++ b/tests/test_score_fission/test_score_fission.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_flux/test_score_flux.py b/tests/test_score_flux/test_score_flux.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_score_flux/test_score_flux.py +++ b/tests/test_score_flux/test_score_flux.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_flux_yn/test_score_flux_yn.py b/tests/test_score_flux_yn/test_score_flux_yn.py index 6e54389fc1..fd3b3ed5b2 100644 --- a/tests/test_score_flux_yn/test_score_flux_yn.py +++ b/tests/test_score_flux_yn/test_score_flux_yn.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_kappafission/test_score_kappafission.py b/tests/test_score_kappafission/test_score_kappafission.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_score_kappafission/test_score_kappafission.py +++ b/tests/test_score_kappafission/test_score_kappafission.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_nufission/test_score_nufission.py b/tests/test_score_nufission/test_score_nufission.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_score_nufission/test_score_nufission.py +++ b/tests/test_score_nufission/test_score_nufission.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_nuscatter/test_score_nuscatter.py b/tests/test_score_nuscatter/test_score_nuscatter.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_score_nuscatter/test_score_nuscatter.py +++ b/tests/test_score_nuscatter/test_score_nuscatter.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_nuscatter_n/test_score_nuscatter_n.py b/tests/test_score_nuscatter_n/test_score_nuscatter_n.py index 6e54389fc1..fd3b3ed5b2 100644 --- a/tests/test_score_nuscatter_n/test_score_nuscatter_n.py +++ b/tests/test_score_nuscatter_n/test_score_nuscatter_n.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_nuscatter_pn/test_score_nuscatter_pn.py b/tests/test_score_nuscatter_pn/test_score_nuscatter_pn.py index 6e54389fc1..fd3b3ed5b2 100644 --- a/tests/test_score_nuscatter_pn/test_score_nuscatter_pn.py +++ b/tests/test_score_nuscatter_pn/test_score_nuscatter_pn.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_nuscatter_yn/test_score_nuscatter_yn.py b/tests/test_score_nuscatter_yn/test_score_nuscatter_yn.py index 6e54389fc1..fd3b3ed5b2 100644 --- a/tests/test_score_nuscatter_yn/test_score_nuscatter_yn.py +++ b/tests/test_score_nuscatter_yn/test_score_nuscatter_yn.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_scatter/test_score_scatter.py b/tests/test_score_scatter/test_score_scatter.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_score_scatter/test_score_scatter.py +++ b/tests/test_score_scatter/test_score_scatter.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_scatter_n/test_score_scatter_n.py b/tests/test_score_scatter_n/test_score_scatter_n.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_score_scatter_n/test_score_scatter_n.py +++ b/tests/test_score_scatter_n/test_score_scatter_n.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_scatter_pn/test_score_scatter_pn.py b/tests/test_score_scatter_pn/test_score_scatter_pn.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_score_scatter_pn/test_score_scatter_pn.py +++ b/tests/test_score_scatter_pn/test_score_scatter_pn.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_scatter_yn/test_score_scatter_yn.py b/tests/test_score_scatter_yn/test_score_scatter_yn.py index 6e54389fc1..fd3b3ed5b2 100644 --- a/tests/test_score_scatter_yn/test_score_scatter_yn.py +++ b/tests/test_score_scatter_yn/test_score_scatter_yn.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_total/test_score_total.py b/tests/test_score_total/test_score_total.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_score_total/test_score_total.py +++ b/tests/test_score_total/test_score_total.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_score_total_yn/test_score_total_yn.py b/tests/test_score_total_yn/test_score_total_yn.py index 6e54389fc1..fd3b3ed5b2 100644 --- a/tests/test_score_total_yn/test_score_total_yn.py +++ b/tests/test_score_total_yn/test_score_total_yn.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_seed/test_seed.py b/tests/test_seed/test_seed.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_seed/test_seed.py +++ b/tests/test_seed/test_seed.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_source_angle_mono/test_source_angle_mono.py b/tests/test_source_angle_mono/test_source_angle_mono.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_source_angle_mono/test_source_angle_mono.py +++ b/tests/test_source_angle_mono/test_source_angle_mono.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_source_energy_maxwell/test_source_energy_maxwell.py b/tests/test_source_energy_maxwell/test_source_energy_maxwell.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_source_energy_maxwell/test_source_energy_maxwell.py +++ b/tests/test_source_energy_maxwell/test_source_energy_maxwell.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_source_energy_mono/test_source_energy_mono.py b/tests/test_source_energy_mono/test_source_energy_mono.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_source_energy_mono/test_source_energy_mono.py +++ b/tests/test_source_energy_mono/test_source_energy_mono.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_source_file/test_source_file.py b/tests/test_source_file/test_source_file.py index 43e8963ecf..b85f70d537 100644 --- a/tests/test_source_file/test_source_file.py +++ b/tests/test_source_file/test_source_file.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -86,7 +87,7 @@ def test_run2(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_source_point/test_source_point.py b/tests/test_source_point/test_source_point.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_source_point/test_source_point.py +++ b/tests/test_source_point/test_source_point.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_sourcepoint_batch/test_sourcepoint_batch.py b/tests/test_sourcepoint_batch/test_sourcepoint_batch.py index 4258a54de7..7f225540f9 100644 --- a/tests/test_sourcepoint_batch/test_sourcepoint_batch.py +++ b/tests/test_sourcepoint_batch/test_sourcepoint_batch.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_statepoint_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.08.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_sourcepoint_interval/test_sourcepoint_interval.py b/tests/test_sourcepoint_interval/test_sourcepoint_interval.py index 2a089747f6..4b75ed68e1 100644 --- a/tests/test_sourcepoint_interval/test_sourcepoint_interval.py +++ b/tests/test_sourcepoint_interval/test_sourcepoint_interval.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_statepoint_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.08.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_sourcepoint_latest/test_sourcepoint_latest.py b/tests/test_sourcepoint_latest/test_sourcepoint_latest.py index 8ce55f2c76..44f1fd300b 100644 --- a/tests/test_sourcepoint_latest/test_sourcepoint_latest.py +++ b/tests/test_sourcepoint_latest/test_sourcepoint_latest.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -35,7 +36,7 @@ def test_statepoint_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_sourcepoint_restart/test_sourcepoint_restart.py b/tests/test_sourcepoint_restart/test_sourcepoint_restart.py index 47033b0121..706f24e969 100644 --- a/tests/test_sourcepoint_restart/test_sourcepoint_restart.py +++ b/tests/test_sourcepoint_restart/test_sourcepoint_restart.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -35,7 +36,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') @@ -62,7 +63,7 @@ def test_created_statepoint_form1(): def test_results_form1(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') @@ -89,7 +90,7 @@ def test_created_statepoint_form2(): def test_results_form2(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') @@ -112,7 +113,7 @@ def test_created_statepoint_serial(): def test_results_serial(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_statepoint_batch/test_statepoint_batch.py b/tests/test_statepoint_batch/test_statepoint_batch.py index e1951d23fd..4298536c52 100644 --- a/tests/test_statepoint_batch/test_statepoint_batch.py +++ b/tests/test_statepoint_batch/test_statepoint_batch.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -39,7 +40,7 @@ def test_statepoints_exist(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.09.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_statepoint_interval/test_statepoint_interval.py b/tests/test_statepoint_interval/test_statepoint_interval.py index 1099566e58..c70d547d8c 100644 --- a/tests/test_statepoint_interval/test_statepoint_interval.py +++ b/tests/test_statepoint_interval/test_statepoint_interval.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys import glob from subprocess import Popen, STDOUT, PIPE, call import filecmp @@ -48,7 +49,7 @@ def test_statepoints_exist(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_statepoint_restart/test_statepoint_restart.py b/tests/test_statepoint_restart/test_statepoint_restart.py index a26a94442a..294e8b812b 100644 --- a/tests/test_statepoint_restart/test_statepoint_restart.py +++ b/tests/test_statepoint_restart/test_statepoint_restart.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') @@ -56,7 +57,7 @@ def test_created_statepoint_form1(): def test_results_form1(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') @@ -81,7 +82,7 @@ def test_created_statepoint_form2(): def test_results_form2(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') @@ -102,7 +103,7 @@ def test_created_statepoint_serial(): def test_results_serial(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_statepoint_sourcesep/test_statepoint_sourcesep.py b/tests/test_statepoint_sourcesep/test_statepoint_sourcesep.py index d9a42310db..b79743ae98 100644 --- a/tests/test_statepoint_sourcesep/test_statepoint_sourcesep.py +++ b/tests/test_statepoint_sourcesep/test_statepoint_sourcesep.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -35,7 +36,7 @@ def test_statepoint_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_survival_biasing/test_survival_biasing.py b/tests/test_survival_biasing/test_survival_biasing.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_survival_biasing/test_survival_biasing.py +++ b/tests/test_survival_biasing/test_survival_biasing.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_tally_assumesep/test_tally_assumesep.py b/tests/test_tally_assumesep/test_tally_assumesep.py index 962a1ca26c..0130cd7a06 100644 --- a/tests/test_tally_assumesep/test_tally_assumesep.py +++ b/tests/test_tally_assumesep/test_tally_assumesep.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -34,7 +35,7 @@ def test_output_exists(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_tally_nuclides/test_tally_nuclides.py b/tests/test_tally_nuclides/test_tally_nuclides.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_tally_nuclides/test_tally_nuclides.py +++ b/tests/test_tally_nuclides/test_tally_nuclides.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_trace/test_trace.py b/tests/test_trace/test_trace.py index eab3f922aa..bfa5163b89 100644 --- a/tests/test_trace/test_trace.py +++ b/tests/test_trace/test_trace.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -33,7 +34,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_track_output/results.py b/tests/test_track_output/results.py index 959dd40d5a..dedc07873f 100644 --- a/tests/test_track_output/results.py +++ b/tests/test_track_output/results.py @@ -17,7 +17,7 @@ except ImportError: exit() # Run track processing script -call(['../../track.py', '-o', 'poly'] + +call(['../../scripts/openmc-track-to-vtk', '-o', 'poly'] + glob.glob(''.join((cwd, '/track*')))) poly = ''.join((cwd, '/poly.pvtp')) assert os.path.isfile(poly), 'poly.pvtp file not found.' diff --git a/tests/test_track_output/test_track_output.py b/tests/test_track_output/test_track_output.py index e37e2fc0db..089efbfb22 100644 --- a/tests/test_track_output/test_track_output.py +++ b/tests/test_track_output/test_track_output.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -32,7 +33,7 @@ def test_created_outputs(): 'Track files not a binary or hdf5 file' def test_outputs(): - call(['python', 'results.py']) + call([sys.executable, 'results.py']) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_translation/test_translation.py b/tests/test_translation/test_translation.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_translation/test_translation.py +++ b/tests/test_translation/test_translation.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_trigger_batch_interval/test_trigger_batch_interval.py b/tests/test_trigger_batch_interval/test_trigger_batch_interval.py index b2c3a5ae7b..c82edb5b5a 100644 --- a/tests/test_trigger_batch_interval/test_trigger_batch_interval.py +++ b/tests/test_trigger_batch_interval/test_trigger_batch_interval.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.19.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_trigger_no_batch_interval/test_trigger_no_batch_interval.py b/tests/test_trigger_no_batch_interval/test_trigger_no_batch_interval.py index b2c3a5ae7b..c82edb5b5a 100644 --- a/tests/test_trigger_no_batch_interval/test_trigger_no_batch_interval.py +++ b/tests/test_trigger_no_batch_interval/test_trigger_no_batch_interval.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.19.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_trigger_no_status/test_trigger_no_status.py b/tests/test_trigger_no_status/test_trigger_no_status.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_trigger_no_status/test_trigger_no_status.py +++ b/tests/test_trigger_no_status/test_trigger_no_status.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_trigger_tallies/test_trigger_tallies.py b/tests/test_trigger_tallies/test_trigger_tallies.py index cb973cb4d2..940d5dc176 100644 --- a/tests/test_trigger_tallies/test_trigger_tallies.py +++ b/tests/test_trigger_tallies/test_trigger_tallies.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.15.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_uniform_fs/test_uniform_fs.py b/tests/test_uniform_fs/test_uniform_fs.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_uniform_fs/test_uniform_fs.py +++ b/tests/test_uniform_fs/test_uniform_fs.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_union_energy_grids/test_union_energy_grids.py b/tests/test_union_energy_grids/test_union_energy_grids.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_union_energy_grids/test_union_energy_grids.py +++ b/tests/test_union_energy_grids/test_union_energy_grids.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_universe/test_universe.py b/tests/test_universe/test_universe.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_universe/test_universe.py +++ b/tests/test_universe/test_universe.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/test_void/test_void.py b/tests/test_void/test_void.py index 6fdbf87459..ab227e2ba3 100644 --- a/tests/test_void/test_void.py +++ b/tests/test_void/test_void.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from subprocess import Popen, STDOUT, PIPE, call import filecmp import glob @@ -31,7 +32,7 @@ def test_created_statepoint(): def test_results(): statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*')) - call(['python', 'results.py', statepoint[0]]) + call([sys.executable, 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: os.rename('results_test.dat', 'results_error.dat') diff --git a/tests/travis.sh b/tests/travis.sh index 0ee8b7fe22..d591428686 100755 --- a/tests/travis.sh +++ b/tests/travis.sh @@ -4,7 +4,7 @@ set -ev # Run all debug tests if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - ./run_tests.py -C "^basic-debug$|^hdf5-debug$|^mpi-omp-debug$|^phdf5-omp-debug$" -j 4 -s + ./run_tests.py -C "^basic-debug$|^hdf5-debug$|^mpi-omp-debug$|^phdf5-omp-debug$" -j 2 -s else - ./run_tests.py -C "^basic-debug$" -j 4 + ./run_tests.py -C "^basic-debug$" -j 2 fi