mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-25 12:35:29 -04:00
20 lines
485 B
Python
20 lines
485 B
Python
import os
|
|
|
|
from openmc.examples import random_ray_lattice
|
|
|
|
from tests.testing_harness import TolerantPyAPITestHarness
|
|
|
|
|
|
class MGXSTestHarness(TolerantPyAPITestHarness):
|
|
def _cleanup(self):
|
|
super()._cleanup()
|
|
f = 'mgxs.h5'
|
|
if os.path.exists(f):
|
|
os.remove(f)
|
|
|
|
|
|
def test_random_ray_basic():
|
|
model = random_ray_lattice()
|
|
model.settings.random_ray['adjoint'] = True
|
|
harness = MGXSTestHarness('statepoint.10.h5', model)
|
|
harness.main()
|