Files
opm-simulators/python/test/test_throw.py
T

18 lines
652 B
Python
Raw Normal View History

2023-09-08 19:40:42 +02:00
import os
import unittest
from pathlib import Path
from .pytest_common import pushd, create_black_oil_simulator
2023-09-08 19:40:42 +02:00
class TestBasic(unittest.TestCase):
@classmethod
def setUpClass(cls):
test_dir = Path(os.path.dirname(__file__))
cls.data_dir = test_dir.parent.joinpath("test_data/SPE1CASE1a")
def test_all(self):
with pushd(self.data_dir):
sim = create_black_oil_simulator(filename="SPE1CASE1.DATA")
2023-09-08 19:40:42 +02:00
# NOTE: The following call should throw an exception since the simulation
# has not been initialized
with self.assertRaises(RuntimeError):
sim.get_dt()