diff --git a/tests/test_mathutils.py b/tests/test_mathutils.py index 38d7ae1..42915e9 100644 --- a/tests/test_mathutils.py +++ b/tests/test_mathutils.py @@ -95,9 +95,14 @@ def test_bits(): chk(Bits('11') >> 1, Bits('1')) chk(Bits('1') << 1, Bits('10')) assert Bits('0') != Bits('00') - chk( - Bits.from_bytes(Bits.from_hex(Bits('10101010').as_bytes()).as_hex()), + # test roundtrip as_/from_hex + chk(Bits.from_hex(Bits('10101010').as_hex()), Bits('10101010')) + # test roundtrip as_/from_bytes + chk( + Bits.from_bytes(Bits('10101010').as_bytes()), + Bits('10101010')) + # pile of roundtripping chk(Bits.from_int( Bits.from_bin( Bits.from_list(