Open wonderbeyond opened 6 years ago
Also seeing this issue.
============= FAILURES ===================================
______________________ TestXid.test_xid_always_reversible ______________________
self = <xid_test.TestXid testMethod=test_xid_always_reversible>
def test_xid_always_reversible(self):
for i in range(1000):
s = Xid().string()
> self.assertEqual(Xid.from_string(s).string(), s)
xid_test.py:50:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'xid.Xid'>, s = 'bnmndnb24smglu325fvg'
@classmethod
def from_string(cls, s):
# type: (str) -> Xid
val = base32hex.b32decode(s.upper())
value_check = [0 <= x < 255 for x in val]
if not all(value_check):
> raise InvalidXid(s)
E xid.InvalidXid: bnmndnb24smglu325fvg
xid.py:159: InvalidXid
========================= 1 failed, 9 passed in 0.12s ==========================
##[error]Process completed with exit code 1.
I've written a test case to reveal this issue.
Execute
py.test
to reproduce error like below: