Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Moved ZepbenTokenAuth to use python dataclasses instead of `zepben.ewb.dataclassy`, existing code should work as is.
* `TypeError`s occurring in `StepAction`s will no longer silently pass
* Drop python 3.9 from list of test envs in tox
* Fix an ImportError being raised when calling `Conductor.is_underground()`

### Notes
* None.
Expand Down
2 changes: 1 addition & 1 deletion src/zepben/ewb/model/cim/iec61970/base/wires/conductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
from typing import Optional, TYPE_CHECKING

from zepben.ewb.model.cim.iec61970.base.core.conducting_equipment import ConductingEquipment
from zepben.ewb.model.cim.iec61968.assetinfo.cable_info import CableInfo

if TYPE_CHECKING:
from zepben.ewb.model.cim.iec61968.assetinfo.cable_info import CableInfo
from zepben.ewb.model.cim.iec61968.assetinfo.wire_info import WireInfo


Expand Down
10 changes: 9 additions & 1 deletion test/cim/iec61970/base/wires/test_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from cim.iec61970.base.core.test_conducting_equipment import conducting_equipment_kwargs, verify_conducting_equipment_constructor_default, \
verify_conducting_equipment_constructor_kwargs, verify_conducting_equipment_constructor_args, conducting_equipment_args
from zepben.ewb import Connector
from zepben.ewb import Connector, Conductor, CableInfo

connector_kwargs = conducting_equipment_kwargs
connector_args = conducting_equipment_args
Expand All @@ -21,3 +21,11 @@ def verify_connector_constructor_kwargs(c: Connector, **kwargs):

def verify_connector_constructor_args(c: Connector):
verify_conducting_equipment_constructor_args(c)


def test_is_underground():
c = Conductor()
assert not c.is_underground()

c.wire_info = CableInfo()
assert c.is_underground()