Issue #36 wontfix

Test failures with Python 2 and absent Paste

Arfrever Frehtes Taifersar Arahesis
created an issue

pyquery/ajax.py contains the following code, which suggests that Paste is optional: {{{ try: from paste.proxy import Proxy except ImportError: Proxy = no_default }}}

When Paste is not installed, then tests with Python 2 have additional error and failure: {{{ $ nosetests-2.7 ... ====================================================================== ERROR: test_proxy (pyquery.test.TestAjaxSelector)


Traceback (most recent call last): File "/tmp/pyquery-1.1/pyquery/test.py", line 355, in test_proxy val = e.get('http://packages.python.org/pyquery/') File "/tmp/pyquery-1.1/pyquery/ajax.py", line 77, in get return self._wsgi_get(path_info, **kwargs) File "/tmp/pyquery-1.1/pyquery/ajax.py", line 43, in _wsgi_get raise ImportError('Paste is not installed') ImportError: Paste is not installed

====================================================================== FAIL: Doctest:


Traceback (most recent call last): File "/usr/lib64/python2.7/doctest.py", line 2166, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for File "/tmp/pyquery-1.1/docs/ajax.txt", line 0


File "/tmp/pyquery-1.1/docs/ajax.txt", line 35, in Failed example: a = d.get('http://packages.python.org/pyquery/') Exception raised: Traceback (most recent call last): File "/usr/lib64/python2.7/doctest.py", line 1254, in __run compileflags, 1) in test.globs File "<doctest [7]>", line 1, in <module> File "/tmp/pyquery-1.1/pyquery/ajax.py", line 77, in get return self._wsgi_get(path_info, **kwargs) File "/tmp/pyquery-1.1/pyquery/ajax.py", line 43, in _wsgi_get raise ImportError('Paste is not installed') ImportError: Paste is not installed


... }}} I suggest that tests, which require Paste, be skipped when Paste is not installed.

Comments (5)

  1. Log in to comment