From 692872297b93cbcfb66f7bf48832ac16d2fc2fa0 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 21 May 2014 17:34:50 -0400 Subject: [PATCH] Fix bug in source file test. When looking for a source file, it was assumed that the current working directory did not contain the character '.'. If the working directory did contain a '.', this test would fail. --- tests/test_source_file/test_source_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_source_file/test_source_file.py b/tests/test_source_file/test_source_file.py index 51801c4dd..790c662d8 100644 --- a/tests/test_source_file/test_source_file.py +++ b/tests/test_source_file/test_source_file.py @@ -74,7 +74,7 @@ def test_run2(): openmc_path = os.path.join(cwd, '../../src/openmc') source = glob.glob(os.path.join(cwd, 'source.10.*')) with open('settings.xml','w') as fh: - fh.write(settings2.format(source[0].split('.')[2])) + fh.write(settings2.format(source[0].split('.')[-1])) if opts.mpi_exec != '': proc = Popen([opts.mpi_exec, '-np', opts.mpi_np, opts.exe, cwd], stderr=STDOUT, stdout=PIPE)