mirror of https://github.com/mahmoud/boltons.git
fix roundtripping tests
This commit is contained in:
parent
e59798c93b
commit
073c756d1a
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue