summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-02-28 01:17:31 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-02-28 02:47:54 +0700
commit77492b792619d66f5395cb0f000d053afb73f9c4 (patch)
treed226a6f59a814e0714cc08c4b92fb183d73c0a49 /src
parentf35413691db5a78640a05d22586a03a7badcea62 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/target/fake_trx/data_msg.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/fake_trx/data_msg.py b/src/target/fake_trx/data_msg.py
index aa264beb..5ee8ed59 100644
--- a/src/target/fake_trx/data_msg.py
+++ b/src/target/fake_trx/data_msg.py
@@ -526,8 +526,8 @@ if __name__ == '__main__':
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)