mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-21 14:35:27 -04:00
23 lines
580 B
Python
23 lines
580 B
Python
import numpy as np
|
|
import openmc
|
|
from packaging.version import parse
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture(scope='module', autouse=True)
|
|
def numpy_version_requirement():
|
|
assert parse(np.__version__) >= parse("1.14"), \
|
|
"Regression tests require NumPy 1.14 or greater"
|
|
|
|
|
|
@pytest.fixture(scope='module', autouse=True)
|
|
def setup_regression_test(request):
|
|
# Reset autogenerated IDs assigned to OpenMC objects
|
|
openmc.reset_auto_ids()
|
|
|
|
# Change to test directory
|
|
olddir = request.fspath.dirpath().chdir()
|
|
try:
|
|
yield
|
|
finally:
|
|
olddir.chdir()
|