CYCAMORE
test_run_inputs.py
Go to the documentation of this file.
1 import os
2 import subprocess
3 
4 from nose.tools import assert_true
5 from nose.plugins.skip import SkipTest
6 
7 import run_inputs as ri
8 from helper import cyclus_has_coin
9 
10 
11 def coin_skipper(filename):
12  raise SkipTest(filename + " cannot be executed since Cyclus was not installed "
13  "with COIN support")
14 
15 
17  files, _, _ = ri.get_files(ri.input_path)
18  for f in files:
19  absfile = os.path.join(ri.input_path, f)
20  with open(absfile) as fh:
21  src = fh.read()
22  if cyclus_has_coin() or "GrowthRegion" not in src:
23  testf = ri.TestFile(ri.cyclus_path, f, "-v0")
24  testf.run()
25  yield assert_true, testf.passed, "Failed running {}".format(f)
26  else:
27  yield coin_skipper, absfile
def coin_skipper(filename)
def cyclus_has_coin()
Definition: helper.py:91