From f2d7462f33d2a5d2aef1bf54d1268d63ddfd9f52 Mon Sep 17 00:00:00 2001 From: Max Chesterfield Date: Tue, 29 Jul 2025 16:22:12 +1000 Subject: [PATCH 1/2] fix imports Signed-off-by: Max Chesterfield --- test/cim/iec61968/infiec61968/infcommon/test_ratio.py | 2 +- test/cim/iec61970/base/protection/test_relay_setting.py | 2 +- .../iec61970/base/wires/test_power_electronics_connection.py | 2 +- test/cim/iec61970/base/wires/test_power_transformer_end.py | 2 +- test/cim/iec61970/base/wires/test_transformer_end.py | 2 +- test/database/paths/test_ewb_data_file_paths.py | 2 +- test/services/network/tracing/traversal/test_step_action.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/cim/iec61968/infiec61968/infcommon/test_ratio.py b/test/cim/iec61968/infiec61968/infcommon/test_ratio.py index 778a34411..cbb7fb97b 100644 --- a/test/cim/iec61968/infiec61968/infcommon/test_ratio.py +++ b/test/cim/iec61968/infiec61968/infcommon/test_ratio.py @@ -3,7 +3,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. -from _pytest.python_api import raises +from pytest import raises from hypothesis import given from hypothesis.strategies import floats diff --git a/test/cim/iec61970/base/protection/test_relay_setting.py b/test/cim/iec61970/base/protection/test_relay_setting.py index 64836125b..3f807622d 100644 --- a/test/cim/iec61970/base/protection/test_relay_setting.py +++ b/test/cim/iec61970/base/protection/test_relay_setting.py @@ -2,7 +2,7 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. -from _pytest.python_api import raises +from pytest import raises from zepben.ewb import RelaySetting, UnitSymbol diff --git a/test/cim/iec61970/base/wires/test_power_electronics_connection.py b/test/cim/iec61970/base/wires/test_power_electronics_connection.py index cdb906529..14f29d203 100644 --- a/test/cim/iec61970/base/wires/test_power_electronics_connection.py +++ b/test/cim/iec61970/base/wires/test_power_electronics_connection.py @@ -4,7 +4,7 @@ # file, You can obtain one at https://mozilla.org/MPL/2.0/. import re -from _pytest.python_api import raises +from pytest import raises from hypothesis import given from hypothesis.strategies import integers, builds, lists, floats, text, booleans from zepben.ewb import PowerElectronicsUnit, BatteryUnit, PowerElectronicsConnection diff --git a/test/cim/iec61970/base/wires/test_power_transformer_end.py b/test/cim/iec61970/base/wires/test_power_transformer_end.py index bc0485d4a..2a5e87879 100644 --- a/test/cim/iec61970/base/wires/test_power_transformer_end.py +++ b/test/cim/iec61970/base/wires/test_power_transformer_end.py @@ -5,7 +5,7 @@ import re import pytest -from _pytest.python_api import raises +from pytest import raises from hypothesis import given from hypothesis.strategies import builds, integers, floats, sampled_from from zepben.ewb import PowerTransformerEnd, PowerTransformer, WindingConnection, TransformerCoolingType diff --git a/test/cim/iec61970/base/wires/test_transformer_end.py b/test/cim/iec61970/base/wires/test_transformer_end.py index d41003800..529bda757 100644 --- a/test/cim/iec61970/base/wires/test_transformer_end.py +++ b/test/cim/iec61970/base/wires/test_transformer_end.py @@ -2,7 +2,7 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. -from _pytest.python_api import raises +from pytest import raises from hypothesis.strategies import floats, booleans, builds, integers from zepben.ewb import Terminal, BaseVoltage, TransformerStarImpedance, PowerTransformer, Fuse from zepben.ewb.model.cim.iec61970.base.wires.transformer_end import TransformerEnd diff --git a/test/database/paths/test_ewb_data_file_paths.py b/test/database/paths/test_ewb_data_file_paths.py index 38aeb3355..62a31c9e7 100644 --- a/test/database/paths/test_ewb_data_file_paths.py +++ b/test/database/paths/test_ewb_data_file_paths.py @@ -7,7 +7,7 @@ from typing import Iterator from unittest.mock import Mock -from _pytest.python_api import raises +from pytest import raises from zepben.ewb import EwbDataFilePaths, DatabaseType diff --git a/test/services/network/tracing/traversal/test_step_action.py b/test/services/network/tracing/traversal/test_step_action.py index 07e31ea3a..f5af4909b 100644 --- a/test/services/network/tracing/traversal/test_step_action.py +++ b/test/services/network/tracing/traversal/test_step_action.py @@ -2,7 +2,7 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. -from _pytest.python_api import raises +from pytest import raises from zepben.ewb import StepAction, StepContext from zepben.ewb.services.network.tracing.traversal.step_action import T From 63ae4124ecfdd8ecbf05e97159db466317c31823 Mon Sep 17 00:00:00 2001 From: Max Chesterfield Date: Tue, 29 Jul 2025 16:23:53 +1000 Subject: [PATCH 2/2] missed one Signed-off-by: Max Chesterfield --- test/cim/iec61970/base/core/test_site.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/cim/iec61970/base/core/test_site.py b/test/cim/iec61970/base/core/test_site.py index 256e650e3..215f8d734 100644 --- a/test/cim/iec61970/base/core/test_site.py +++ b/test/cim/iec61970/base/core/test_site.py @@ -5,10 +5,9 @@ import pytest from hypothesis import given -from zepben.ewb.services.network.tracing.networktrace.operators.network_state_operators import NetworkStateOperators from cim.iec61970.base.core.test_equipment_container import equipment_container_kwargs, verify_equipment_container_constructor_default, \ verify_equipment_container_constructor_kwargs, verify_equipment_container_constructor_args, equipment_container_args -from zepben.ewb import Site, TestNetworkBuilder, Equipment, AssignToLvFeeders, LvFeeder +from zepben.ewb import Site, TestNetworkBuilder, Equipment, AssignToLvFeeders, LvFeeder, NetworkStateOperators site_kwargs = equipment_container_kwargs site_args = equipment_container_args