From 1d757283dc52b528fd528675ce6952a95431690f Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 8 Oct 2025 15:21:05 +0200 Subject: [PATCH] don't use pytest and fix include paths --- .../ml/hybrid_newton/test_hybrid_newton.py | 6 +++--- pythonIntegrationTests.cmake | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/python/integration_tests/ml/hybrid_newton/test_hybrid_newton.py b/python/integration_tests/ml/hybrid_newton/test_hybrid_newton.py index a4db6f64032..7f034886130 100644 --- a/python/integration_tests/ml/hybrid_newton/test_hybrid_newton.py +++ b/python/integration_tests/ml/hybrid_newton/test_hybrid_newton.py @@ -4,9 +4,9 @@ import numpy as np import subprocess -from .utils import Dense, Sequential -from .utils import collect_input_features, compute_output_vars, write_config, extract_newtit_from_file, extract_unrst_variables -from .utils import (ABSOLUTE_CASES, RELATIVE_CASES, FEATURE_ENGINEERING_CASES, SCALING_CASES, MULTI_MODEL_CASES, ZERO_NEWTON_CASES, ALL_CASES) +from utils import Dense, Sequential +from utils import collect_input_features, compute_output_vars, write_config, extract_newtit_from_file, extract_unrst_variables +from utils import ABSOLUTE_CASES, RELATIVE_CASES, FEATURE_ENGINEERING_CASES, SCALING_CASES, MULTI_MODEL_CASES, ZERO_NEWTON_CASES, ALL_CASES from opm.ml.ml_tools.kerasify import export_model diff --git a/pythonIntegrationTests.cmake b/pythonIntegrationTests.cmake index 40d259e2e8a..a63b450945c 100644 --- a/pythonIntegrationTests.cmake +++ b/pythonIntegrationTests.cmake @@ -3,7 +3,9 @@ file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/tests/integration/HybridNewton) add_test(NAME HybridNewton COMMAND - pytest ${PROJECT_SOURCE_DIR}/python/integration_tests/ml/hybrid_newton + ${Python3_EXECUTABLE} + -m unittest discover + ${PROJECT_SOURCE_DIR}/python/integration_tests/ml/hybrid_newton WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests/integration/HybridNewton )