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.
This commit is contained in:
Paul Romano 2014-05-21 17:34:50 -04:00
parent 74fb90a923
commit 692872297b

View file

@ -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)