Vadim Yanitskiy has submitted this change and it was merged.

Change subject: fake_trx/data_msg.py: fix python3 compatibility in tests
......................................................................


fake_trx/data_msg.py: fix python3 compatibility in tests

In Python3 a range has it's own type, so its comparasion with
a list is incorrect. Let's explicitly convert both bit ranges
to lists in the bit conversation tests.

Change-Id: I98c40d3d63cbcdc3e5dc840ebf8d7310c5c08e56
---
M src/target/fake_trx/data_msg.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/target/fake_trx/data_msg.py b/src/target/fake_trx/data_msg.py
index aa264be..5ee8ed5 100644
--- a/src/target/fake_trx/data_msg.py
+++ b/src/target/fake_trx/data_msg.py
@@ -526,8 +526,8 @@
        print("[?] Validate header randomization: OK")
 
        # Bit conversation test
-       usbits_ref = range(0, 256)
-       sbits_ref = range(-127, 128)
+       usbits_ref = list(range(0, 256))
+       sbits_ref = list(range(-127, 128))
 
        # Test both usbit2sbit() and sbit2usbit()
        sbits = msg_trx2l1_ref.usbit2sbit(usbits_ref)

-- 
To view, visit https://gerrit.osmocom.org/6987
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I98c40d3d63cbcdc3e5dc840ebf8d7310c5c08e56
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Vadim Yanitskiy <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy <[email protected]>

Reply via email to