Commit Graph
13 Commits
Author SHA1 Message Date
Svenn Tveit 116e22e58c Safe creation of OnePhaseSimulator object in tests 2025-09-23 13:20:10 +02:00
Svenn Tveit fc3e1bb73f Tests for OnePhaseSimulator 2025-09-23 12:54:27 +02:00
Arne Morten Kvarving 7679d64ed1 Merge pull request #6488 from svenn-t/fix_pygaswater_tests
Fix Python gas-water simulator test failures
2025-09-23 08:31:49 +02:00
Håkon Hægland c195df978d Refactor: Use factory fixtures for simulator creation in tests
Move simulator instantiation to factory functions that automatically
disable async ECL output. This prevents future contributors from
forgetting the --enable-async-ecl-output=false flag.

- Add create_black_oil_simulator/create_gas_water_simulator to pytest_common
- Define ENABLE_ASYNC_ECL_OUTPUT_FLAG constant
- Update all tests to use factory functions
- No functional changes, pure refactoring
2025-09-23 05:09:20 +02:00
Håkon Hægland 831354a0db Fix race condition in Python tests by disabling async ECL output
Add --enable-async-ecl-output=false to all Python simulator tests to prevent
race condition between async file writing tasklets and pushd context manager.

Problem:
- Tests use pushd() to change directory before running simulations
- Simulator dispatches async tasklets to write ECL output files
- pushd context exits before async writes complete
- Tasklets write files in wrong directory (build/python/ instead of test_data/)
- Causes confusing error messages and misplaced output files

Solution:
- Disable async ECL output during tests for deterministic behavior
- Files now created in correct locations within test_data/ directories
- Eliminates "Can not open EclFile" errors in logs
- Makes test execution predictable and synchronous
2025-09-22 20:46:10 +02:00
Svenn Tveit b79d16c3e8 Fix failures in docker tests 2025-09-19 14:18:22 +02:00
Håkon Hægland b5e7ccc0b1 Clarify why test case ordering is necessary
and delete comment in code about static variables that can no longer be
reproduced.
2025-09-17 10:06:49 +02:00
Svenn Tveit 67a701ef4f Tests for PyGasWaterSimulator 2025-09-17 10:06:49 +02:00
hnil 6609d9fbcb changed references 2024-08-29 11:19:29 +02:00
hnil 5c0176371c -- fixed reference 2024-08-28 13:27:46 +02:00
Tor Harald Sandve 8e490e9b3f relax python tests slightly 2024-08-16 10:18:50 +02:00
Kai Bao 027c3ba0fc using one day time step for SPE1CASE1a/SPE1CASE1.DATA
to avoid time stepping change causes test failures for the python tests
2024-06-19 13:42:55 +02:00
Håkon Hægland 55aab60549 Get primary variables and fluid state from Python
Added methods to Python module opm.simulators.BlackOilSimulator to
access primary variables and fluid state variables.
2024-03-01 14:22:35 +01:00