Updating DAGMC test, harness, and statepoint read.

This commit is contained in:
Patrick Shriwise 2018-10-01 13:40:16 -05:00
parent b2751f25f0
commit 275df356b4
4 changed files with 11 additions and 15 deletions

View file

@ -266,7 +266,10 @@ class Geometry(object):
Dictionary mapping cell IDs to :class:`openmc.Cell` instances
"""
return self.root_universe.get_all_cells()
if self.root_universe is not None:
return self.root_universe.get_all_cells()
else:
return []
def get_all_universes(self):
"""Return all universes in the geometry.

View file

@ -0,0 +1,5 @@
k-combined:
1.115067E+00 5.423808E-02
tally 1:
8.543144E+00
1.530584E+01

View file

@ -1,4 +1,4 @@
from tests.testing_harness import CADTestHarness
from tests.testing_harness import TestHarness
import os
import pytest
@ -7,5 +7,5 @@ pytestmark = pytest.mark.skipif(
reason="DAGMC CAD geometry is not enabled.")
def test_dagmc():
harness = CADTestHarness('statepoint.5.h5')
harness = TestHarness('statepoint.5.h5')
harness.main()

View file

@ -312,15 +312,3 @@ class HashedPyAPITestHarness(PyAPITestHarness):
def _get_results(self):
"""Digest info in the statepoint and return as a string."""
return super()._get_results(True)
class CADTestHarness(TestHarness):
def execute_test(self):
"""Run OpenMC with the appropriate arguments and check the outputs."""
try:
self._run_openmc()
self._test_output_created()
finally:
self._cleanup()