Issue #306 resolved

Python 3.3 test failures

Barry Warsaw
created an issue

I'm in the process of adding Python3 packages for Debian/Ubuntu. On Ubuntu 13.04 we'll only have Python 3.3 and I'm seeing a few test failures.

With the PyPI published tarball of 2.4.1, running

$ python3.3 setup.py test

yields the following failures:

======================================================================
FAIL: test_parsing.test_dismax
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/barry/projects/ubuntu/pywhoosh/Whoosh-2.4.1/tests/test_parsing.py", line 717, in test_dismax
    "DisMax(body:charlie^0.8 title:charlie^2.5))")
AssertionError: '(DisMax(title:alfa^2.5 body:alfa^0.8) OR DisMax(title:bravo^2.5 body:bravo^0.8) [truncated]... != '(DisMax(body:alfa^0.8 title:alfa^2.5) OR DisMax(body:bravo^0.8 title:bravo^2.5) [truncated]...
- (DisMax(title:alfa^2.5 body:alfa^0.8) OR DisMax(title:bravo^2.5 body:bravo^0.8) OR DisMax(title:charlie^2.5 body:charlie^0.8))
+ (DisMax(body:alfa^0.8 title:alfa^2.5) OR DisMax(body:bravo^0.8 title:bravo^2.5) OR DisMax(body:charlie^0.8 title:charlie^2.5))


======================================================================
FAIL: test_sorting.test_query_facet2
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/barry/projects/ubuntu/pywhoosh/Whoosh-2.4.1/tests/test_sorting.py", line 411, in test_query_facet2
    'g-i': [3, 6]})
AssertionError: {'a-c': [0, 1, 2, 7, 8], 'd-f': [3, 4, 5, 6]} != {'a-c': [0, 1, 2, 7, 8], 'd-f': [4, 5], 'g-i': [3, 6]}
- {'a-c': [0, 1, 2, 7, 8], 'd-f': [3, 4, 5, 6]}
?                                     ------

+ {'a-c': [0, 1, 2, 7, 8], 'd-f': [4, 5], 'g-i': [3, 6]}
?                                 +++++++++++++++

(with 2 skipped tests)

I see one other test failure when building the package at lp:~barry/ubuntu/raring/python-whoosh/py3

======================================================================
FAIL: test_fields.test_token_boost
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/«PKGBUILDDIR»/tests/test_fields.py", line 456, in test_token_boost
    ('F', 1, 1.0, b('\x00\x00\x00\x01'))])
AssertionError: Lists differ: [('FF', 1, 0.5, b'\x00\x00\x00... != [('SPRS', 1, 1.0, b'\x00\x00\x...

First differing element 0:
('FF', 1, 0.5, b'\x00\x00\x00\x01')
('SPRS', 1, 1.0, b'\x00\x00\x00\x01')

+ [('SPRS', 1, 1.0, b'\x00\x00\x00\x01'),
- [('FF', 1, 0.5, b'\x00\x00\x00\x01'),
? ^

+  ('FF', 1, 0.5, b'\x00\x00\x00\x01'),
? ^

-  ('F', 1, 1.0, b'\x00\x00\x00\x01'),
?                                    ^

+  ('F', 1, 1.0, b'\x00\x00\x00\x01')]
?                                    ^

-  ('SPRS', 1, 1.0, b'\x00\x00\x00\x01')]

Comments (7)

  1. Barry Warsaw reporter

    That last failure is a sort order dependency. If you s/list/sorted/ in the test and sort the expected results, it passes. That does expose the first two failures though.

  2. Barry Warsaw reporter

    The test_dismax failure is probably also a sort order dependency. If I change s/list/sorted/ in DisMaxParser() in qparser/default.py, I can get this to pass. That's a little dicer though (not sure about the semantics).

  3. Barry Warsaw reporter

    I am unable to apply the patch stack from the 2.4x patches to the released version of 2.4.1. I'm also not keen on publishing the hg tip into Ubuntu and Debian. Any chance we can get a new upstream release that fixes the Python 3.3 problems?

  4. Log in to comment