nicolasff / webdis

A Redis HTTP interface with JSON output
https://webd.is
BSD 2-Clause "Simplified" License
2.82k stars 305 forks source link

Failing tests on Ubuntu using python-msgpack v0.3 #92

Open jollyroger opened 10 years ago

jollyroger commented 10 years ago

Nicolas, I've found that webdis fails msgpack-related tests using python-mspack with version 0.3.0. All tests pass with python-msgpack version 0.2.0 installed. However this package only is available in Debian and not Ubuntu. This affects recent Ubuntu versions(saucy and upcoming trusty), here is detailed output:

python tests/basic.py
............F..FF.....
======================================================================
FAIL: test_error (__main__.TestMsgPack)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/basic.py", line 145, in wrapper
    fn(self)
  File "tests/basic.py", line 192, in test_error
    self.assertTrue(isinstance(obj['UNKNOWN'], tuple))
AssertionError: False is not true

======================================================================
FAIL: test_list (__main__.TestMsgPack)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/basic.py", line 145, in wrapper
    fn(self)
  File "tests/basic.py", line 183, in test_list
    self.assertTrue(obj == {'LRANGE': ('abc', 'def')})
AssertionError: False is not true

======================================================================
FAIL: test_set (__main__.TestMsgPack)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/basic.py", line 145, in wrapper
    fn(self)
  File "tests/basic.py", line 157, in test_set
    self.assertTrue(obj == {'SET': (True, 'OK')})
AssertionError: False is not true

----------------------------------------------------------------------
Ran 22 tests in 0.053s

FAILED (failures=3)

These errors do not appear for Debian jessie(current testing) and sid(unstable). Debian has two packages related to python and msgpack that are used in the test suite: python-msgpack with version 0.3.0 of the library and msgpack-python with version 0.2.0 of the same library. Ubuntu has just msgpack-python package that points to the 0.3.0 version. I assume version 0.2.0 will be dropped soon from Debian as well.

jollyroger commented 10 years ago

Bump. Nicolas, I just cannot add webdis to the Debian distribution because it fails tests on a newer (and now default) version of python-msgpack. Please look on this issue.

jollyroger commented 9 years ago

Nicolas,

It seems, msgpack has switched to using lists instead of tuples in failed tests. I have added patch to make tests pass. See this patch for details: https://github.com/jollyroger/webdis/blob/e1d629ea94362bb7fd9a63f574e419b41298cc84/debian/patches/tests.patch

jollyroger commented 5 years ago

Friendly bump. Do you want me to send Pull Request that fixes the tests?

nicolasff commented 5 years ago

A pull request would be much appreciated!

On Aug 22, 2018, at 3:01 AM, Andrii Senkovych notifications@github.com wrote:

Friendly bump. Do you want me to send Pull Request that fixes the tests?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

jollyroger commented 5 years ago

@nicolasff I've created pull request for this issue (and some others) as you requested. Hope they are fine.