diff --git a/tests/run_tests.py b/tests/run_tests.py index 49975c218..610ad2422 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -6,6 +6,7 @@ import os import sys import nose import glob +import shutil from subprocess import call from nose_mpi import NoseMPI @@ -46,9 +47,8 @@ def run_suite(name=None, mpi=False): try: os.chdir(pwd) - os.rename(pwd + '/../src/openmc-' + name, pwd + '/../src/openmc') + shutil.copyfile(pwd + '/../src/openmc-' + name, pwd + '/../src/openmc') result = nose.run(argv=argv, addplugins=plugins) - os.rename(pwd + '/../src/openmc', pwd + '/../src/openmc-' + name) except OSError: result = False print('No OpenMC executable found for ' + name + ' tests')