Simple changes to address reviewer comments

Re-organize some imports, use run_in_tmpdir fixture,
use FutureWarning over DeprecationWarning
This commit is contained in:
Andrew Johnson 2019-06-11 13:54:13 -04:00
parent 3429ab21b2
commit 0c0e591cb7
No known key found for this signature in database
GPG key ID: 253418E91B7F6FEB
2 changed files with 5 additions and 7 deletions

View file

@ -80,7 +80,7 @@ class TransportOperator(metaclass=ABCMeta):
else:
warn("Use of OPENMC_DEPLETE_CHAIN is deprecated in favor "
"of adding depletion_chain to OPENMC_CROSS_SECTIONS",
DeprecationWarning)
FutureWarning)
self.chain = Chain.from_xml(chain_file)
@abstractmethod

View file

@ -4,21 +4,20 @@ Modifies and resets environment variable OPENMC_CROSS_SECTIONS
to a custom file with new depletion_chain node
"""
from os import remove
from os import environ
from unittest import mock
from pathlib import Path
import pytest
import pytest
from openmc.deplete.abc import TransportOperator
from openmc.deplete.chain import Chain
BARE_XS_FILE = "bare_cross_sections.xml"
CHAIN_PATH = Path().cwd() / "tests" / "chain_simple.xml"
CHAIN_PATH = Path(__file__).parents[1] / "chain_simple.xml"
@pytest.fixture(scope="module")
def bare_xs():
@pytest.fixture()
def bare_xs(run_in_tmpdir):
"""Create a very basic cross_sections file, return simple Chain.
"""
@ -33,7 +32,6 @@ def bare_xs():
out.write(bare_xs_contents)
yield
remove(BARE_XS_FILE)
class BareDepleteOperator(TransportOperator):