mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Change particle restart test to check for output on stderr rather than checking the return status.
This commit is contained in:
parent
21cbbe823f
commit
f83a2dd996
1 changed files with 9 additions and 11 deletions
|
|
@ -10,21 +10,19 @@ def setup():
|
|||
os.chdir(pwd)
|
||||
|
||||
def test_run():
|
||||
proc = Popen([pwd + '/../../src/openmc'], stderr=STDOUT, stdout=PIPE)
|
||||
returncode = proc.wait()
|
||||
print(proc.communicate()[0])
|
||||
assert returncode != 0
|
||||
|
||||
def test_run_restart():
|
||||
proc = Popen([pwd + '/../../src/openmc -s particle_0.binary'],
|
||||
stderr=STDOUT, stdout=PIPE)
|
||||
returncode = proc.wait()
|
||||
print(proc.communicate()[0])
|
||||
assert returncode != 0
|
||||
proc = Popen([pwd + '/../../src/openmc'], stderr=PIPE, stdout=PIPE)
|
||||
stdout, stderr = proc.communicate()
|
||||
assert stderr != ''
|
||||
|
||||
def test_created_restart():
|
||||
assert os.path.exists(pwd + '/particle_0.binary')
|
||||
|
||||
def test_run_restart():
|
||||
proc = Popen([pwd + '/../../src/openmc -s particle_0.binary'],
|
||||
stderr=PIPE, stdout=PIPE, shell=True)
|
||||
stdout, stderr = proc.communicate()
|
||||
assert stderr != ''
|
||||
|
||||
def teardown():
|
||||
output = [pwd + '/particle_0.binary']
|
||||
for f in output:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue