changed BitPosition to BitAddress
All checks were successful
Build on RHEL9 / build (push) Successful in 3m44s
Build on RHEL8 / build (push) Successful in 5m17s

This commit is contained in:
2025-12-11 13:04:13 +01:00
parent ee3222e56b
commit 654c16b52b
21 changed files with 161 additions and 165 deletions

View File

@@ -8,7 +8,7 @@ Testing functions from utils.py
import pytest
from slsdet.utils import *
from slsdet import IpAddr, MacAddr, DurationWrapper, RegisterAddress, RegisterValue, BitPosition
from slsdet import IpAddr, MacAddr, DurationWrapper, RegisterAddress, RegisterValue, BitAddress
import datetime as dt
import pathlib
from pathlib import Path
@@ -251,8 +251,8 @@ def test_make_bit_pos_from_dict():
}
res = make_bit_position(arg)
assert res == {
0: BitPosition(RegisterAddress("0x0"), 2),
1: BitPosition(RegisterAddress("0x305"), 23)
0: BitAddress(RegisterAddress("0x0"), 2),
1: BitAddress(RegisterAddress("0x305"), 23)
}
assert res[0].str() == "[0x0, 2]"
assert res[1].str() == "[0x305, 23]"
@@ -263,13 +263,13 @@ def test_make_bit_pos_from_list():
(RegisterAddress(0), 2),
(RegisterAddress(0x305), 23)
]
expected = [BitPosition(*a) for a in arg]
expected = [BitAddress(*a) for a in arg]
assert make_bit_position(arg) == expected
def test_make_bit_pos_from_tuple():
arg = (RegisterAddress(0x305), 23)
expected = BitPosition(*arg)
expected = BitAddress(*arg)
assert make_bit_position(arg) == expected