We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xid.from_string
I've written a test case to reveal this issue.
Execute py.test to reproduce error like below:
py.test
$ py.test ====================================================== test session starts ======================================================= platform linux2 -- Python 2.7.12, pytest-3.2.5, py-1.5.2, pluggy-0.4.0 rootdir: /home/wonder/workspace/python_xid, inifile: collected 10 items xid_test.py .........F ============================================================ 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 = 'b8edi0qo1j65kvnoejvg' @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 InvalidXid: b8edi0qo1j65kvnoejvg xid.py:152: InvalidXid =============================================== 1 failed, 9 passed in 0.06 seconds ===============================================
The text was updated successfully, but these errors were encountered:
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.
Sorry, something went wrong.
No branches or pull requests
I've written a test case to reveal this issue.
Execute
py.test
to reproduce error like below:The text was updated successfully, but these errors were encountered: