vheon / JediHTTP

Simple http wrapper around jedi
Apache License 2.0
40 stars 9 forks source link

[READY] Fix tests on Python 2.6 #32

Closed micbou closed 7 years ago

micbou commented 7 years ago

Tests are failing on Python 2.6 because WebTest removed its 2.6 compatibility shim for OrderedDict:

Traceback (most recent call last):
  File "/home/travis/build/vheon/JediHTTP/.tox/py26/lib/python2.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/home/travis/build/vheon/JediHTTP/.tox/py26/lib/python2.6/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/home/travis/build/vheon/JediHTTP/.tox/py26/lib/python2.6/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/travis/build/vheon/JediHTTP/jedihttp/tests/handlers_test.py", line 18, in <module>
    from webtest import TestApp
  File "/home/travis/build/vheon/JediHTTP/.tox/py26/lib/python2.6/site-packages/webtest/__init__.py", line 9, in <module>
    from webtest.app import TestApp
  File "/home/travis/build/vheon/JediHTTP/.tox/py26/lib/python2.6/site-packages/webtest/app.py", line 32, in <module>
    from webtest.response import TestResponse
  File "/home/travis/build/vheon/JediHTTP/.tox/py26/lib/python2.6/site-packages/webtest/response.py", line 5, in <module>
    from webtest import forms
  File "/home/travis/build/vheon/JediHTTP/.tox/py26/lib/python2.6/site-packages/webtest/forms.py", line 8, in <module>
    from collections import OrderedDict
ImportError: cannot import name OrderedDict

Since WebTest officially dropped support of Python 2.6 in version 2.0.24, we require an older version for our tests.


This change is Reviewable

vheon commented 7 years ago

Thanks! I imagine the other PRs are waiting for this to be merged, right?

:lgtm: @homu r+


Reviewed 1 of 1 files at r1. Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

homu commented 7 years ago

:pushpin: Commit 5c8ba53 has been approved by vheon

homu commented 7 years ago

:zap: Test exempted - status

micbou commented 7 years ago

Thanks! I imagine the other PRs are waiting for this to be merged, right?

Yes, they are now ready.


Comments from Reviewable