Skip to content

Commit

Permalink
test_decoding: use BaseVariant on one occasion
Browse files Browse the repository at this point in the history
this slightly increases the coverage of the tests. (With the exception
of the variant pattern functionality, `BaseVariant`s are supposed to
exhibit the same API ase `EcuVariant`s.)

Signed-off-by: Andreas Lauser <[email protected]>
Signed-off-by: Florian Jost <[email protected]>
  • Loading branch information
andlaus committed Aug 6, 2024
1 parent 3284f83 commit bbd05fd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_decoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from odxtools.dataobjectproperty import DataObjectProperty
from odxtools.determinenumberofitems import DetermineNumberOfItems
from odxtools.diagdatadictionaryspec import DiagDataDictionarySpec
from odxtools.diaglayers.basevariant import BaseVariant
from odxtools.diaglayers.basevariantraw import BaseVariantRaw
from odxtools.diaglayers.diaglayertype import DiagLayerType
from odxtools.diaglayers.ecuvariant import EcuVariant
from odxtools.diaglayers.ecuvariantraw import EcuVariantRaw
Expand Down Expand Up @@ -495,8 +497,8 @@ def test_decode_nrc_const(self) -> None:
sdgs=[],
)

ecu_variant_raw = EcuVariantRaw(
variant_type=DiagLayerType.ECU_VARIANT,
base_variant_raw = BaseVariantRaw(
variant_type=DiagLayerType.BASE_VARIANT,
odx_id=OdxLinkId("dl_id", doc_frags),
short_name="dl_sn",
long_name=None,
Expand Down Expand Up @@ -530,12 +532,11 @@ def test_decode_nrc_const(self) -> None:
sdgs=[],
parent_refs=[],
comparam_refs=[],
ecu_variant_patterns=[],
diag_variables_raw=[],
variable_groups=NamedItemList(),
dyn_defined_spec=None,
)
ecu_variant = EcuVariant(diag_layer_raw=ecu_variant_raw)
ecu_variant = BaseVariant(diag_layer_raw=base_variant_raw)
db = Database()
odxlinks = OdxLinkDatabase()
odxlinks.update(ecu_variant._build_odxlinks())
Expand Down

0 comments on commit bbd05fd

Please sign in to comment.