mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
The data directory is relative to the parent.
The test data directory is relative to the parent directory, not the current directory.
This commit is contained in:
@@ -54,14 +54,15 @@ class TestBasic(unittest.TestCase):
|
|||||||
# in which each test_xxx() method is called by unittest is not defined).
|
# in which each test_xxx() method is called by unittest is not defined).
|
||||||
# However, as noted above this is not currently possible.
|
# However, as noted above this is not currently possible.
|
||||||
#
|
#
|
||||||
cls.data_dir = os.path.join( os.path.dirname(__file__), "test_data/SPE1CASE1")
|
test_dir = Path(os.path.dirname(__file__))
|
||||||
|
cls.data_dir = test_dir.parent.joinpath("test_data/SPE1CASE1")
|
||||||
|
|
||||||
|
|
||||||
def test_all(self):
|
def test_all(self):
|
||||||
with self.pushd(cls.data_dir):
|
with pushd(self.data_dir):
|
||||||
sim = BlackOilSimulator("SPE1CASE1.DATA")
|
sim = BlackOilSimulator("SPE1CASE1.DATA")
|
||||||
sim.step_init()
|
sim.step_init()
|
||||||
self.sim.step()
|
sim.step()
|
||||||
|
|
||||||
poro = sim.get_porosity()
|
poro = sim.get_porosity()
|
||||||
self.assertEqual(len(poro), 300, 'length of porosity vector')
|
self.assertEqual(len(poro), 300, 'length of porosity vector')
|
||||||
|
|||||||
Reference in New Issue
Block a user