Skip to content
New issue

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

4 broken unit tests #6

Open
s-celles opened this issue Sep 5, 2017 · 0 comments
Open

4 broken unit tests #6

s-celles opened this issue Sep 5, 2017 · 0 comments

Comments

@s-celles
Copy link

s-celles commented Sep 5, 2017

Hello,

Some unit tests are broken

$ python cbor/tests/test_cbor.py
........Fserialized 150000 objects into 1923893 cbor bytes in 0.30 seconds (507777.61/s, 6512731.9B/s) and 3653600 json bytes in 0.91 seconds (164077.87/s, 3996499.4B/s)
compress to 1826615 bytes cbor.gz and 2124527 bytes json.gz
load 150000 objects from cbor in 0.24 secs (612829.62/sec, 7860124.2B/s) and json in 1.13 (132291.01/sec, 3222256.1B/s)
...........Fserialized 2000 objects into 24920 cbor bytes in 0.03 seconds (74462.81/s, 927806.6B/s) and 47270 json bytes in 0.01 seconds (175854.43/s, 4156319.4B/s)
compress to 23736 bytes cbor.gz and 28343 bytes json.gz
load 2000 objects from cbor in 0.00 secs (608134.55/sec, 7577356.5B/s) and json in 0.02 (120932.56/sec, 2858241.1B/s)
...........Fserialized 2000 objects into 24886 cbor bytes in 0.00 seconds (474952.33/s, 5909831.8B/s) and 47282 json bytes in 0.01 seconds (176146.15/s, 4164271.1B/s)
compress to 23728 bytes cbor.gz and 28400 bytes json.gz
load 2000 objects from cbor in 0.03 secs (61525.77/sec, 765565.2B/s) and json in 0.01 (142619.74/sec, 3371673.3B/s)
...........Fserialized 1000 objects into 11904 cbor bytes in 0.01 seconds (82466.02/s, 981675.4B/s) and 22625 json bytes in 0.01 seconds (164831.56/s, 3729314.2B/s)
compress to 11358 bytes cbor.gz and 13772 bytes json.gz
load 1000 objects from cbor in 0.01 secs (72437.98/sec, 862301.7B/s) and json in 0.01 (108590.39/sec, 2456857.7B/s)
...
======================================================================
FAIL: test_sortkeys (__main__.TestCBORCC)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "cbor/tests/test_cbor.py", line 296, in test_sortkeys
    assert someXMiss
AssertionError

======================================================================
FAIL: test_sortkeys (__main__.TestCBORCPy)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "cbor/tests/test_cbor.py", line 296, in test_sortkeys
    assert someXMiss
AssertionError

======================================================================
FAIL: test_sortkeys (__main__.TestCBORPyC)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "cbor/tests/test_cbor.py", line 296, in test_sortkeys
    assert someXMiss
AssertionError

======================================================================
FAIL: test_sortkeys (__main__.TestCBORPyPy)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "cbor/tests/test_cbor.py", line 296, in test_sortkeys
    assert someXMiss
AssertionError

----------------------------------------------------------------------
Ran 48 tests in 13.485s

FAILED (failures=4)

Kind regards

dol-sen added a commit to dol-sen/cbor_py that referenced this issue Jul 20, 2020
Newer python dictionaries are keeping the order the keys were added in.
As a result since both lists were pre-sorted and identicle so the later
test failed to find any expected differences causing the failure.
This change introduces 3 entries that are out of sorted order for both
the obytes and xbytes lists.  This ensures a valid test of sorting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant