Some test failing on python2 (Debian)
mbehrle opened this issue · 4 comments
I had to disable the tests on python 2.7 (building foor Debian) because of syntax errors in some tests. Could those tests be made aware of used Python version?
Thanks,
Mathias
The relevant bits:
dh_auto_test -O--buildsystem=pybuild
I: pybuild base:217: cd /<>/.pybuild/cpython2_2.7_cached-property/build; python2.7 -m unittest discover -v
tests.test_coroutine_cached_property (unittest.loader.ModuleImportFailure) ... ERROR
tests.test_async_cached_property (unittest.loader.ModuleImportFailure) ... ERROR
test_cached_property (tests.test_cached_property.TestCachedProperty) ... ok
test_none_cached_property (tests.test_cached_property.TestCachedProperty) ... ok
test_reset_cached_property (tests.test_cached_property.TestCachedProperty) ... ok
test_set_cached_property (tests.test_cached_property.TestCachedProperty) ... ok
test_threads (tests.test_cached_property.TestCachedProperty) ... ok
test_cached_property (tests.test_cached_property.TestCachedPropertyWithTTL) ... ok
test_none_cached_property (tests.test_cached_property.TestCachedPropertyWithTTL) ... ok
test_reset_cached_property (tests.test_cached_property.TestCachedPropertyWithTTL) ... ok
test_set_cached_property (tests.test_cached_property.TestCachedPropertyWithTTL) ... ok
test_threads (tests.test_cached_property.TestCachedPropertyWithTTL) ... ok
test_threads_ttl_expiry (tests.test_cached_property.TestCachedPropertyWithTTL) ... ok
test_ttl_expiry (tests.test_cached_property.TestCachedPropertyWithTTL) ... ok
test_cached_property (tests.test_cached_property.TestThreadedCachedProperty) ... ok
test_none_cached_property (tests.test_cached_property.TestThreadedCachedProperty) ... ok
test_reset_cached_property (tests.test_cached_property.TestThreadedCachedProperty) ... ok
test_set_cached_property (tests.test_cached_property.TestThreadedCachedProperty) ... ok
test_threads (tests.test_cached_property.TestThreadedCachedProperty) ... ok
test_cached_property (tests.test_cached_property.TestThreadedCachedPropertyWithTTL) ... ok
test_none_cached_property (tests.test_cached_property.TestThreadedCachedPropertyWithTTL) ... ok
test_reset_cached_property (tests.test_cached_property.TestThreadedCachedPropertyWithTTL) ... ok
test_set_cached_property (tests.test_cached_property.TestThreadedCachedPropertyWithTTL) ... ok
test_threads (tests.test_cached_property.TestThreadedCachedPropertyWithTTL) ... ok
test_threads_ttl_expiry (tests.test_cached_property.TestThreadedCachedPropertyWithTTL) ... ok
test_ttl_expiry (tests.test_cached_property.TestThreadedCachedPropertyWithTTL) ... ok
======================================================================
ERROR: tests.test_coroutine_cached_property (unittest.loader.ModuleImportFailure)
ImportError: Failed to import test module: tests.test_coroutine_cached_property
Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/loader.py", line 254, in _find_tests
module = self._get_module_from_name(name)
File "/usr/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
import(name)
File "tests/test_coroutine_cached_property.py", line 60
value = yield from check.add_control()
^
SyntaxError: invalid syntax
======================================================================
ERROR: tests.test_async_cached_property (unittest.loader.ModuleImportFailure)
ImportError: Failed to import test module: tests.test_async_cached_property
Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/loader.py", line 254, in _find_tests
module = self._get_module_from_name(name)
File "/usr/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
import(name)
File "tests/test_async_cached_property.py", line 34
async def add_control(self):
^
SyntaxError: invalid syntax
Okay, looks like https://github.com/pydanny/cached-property/blob/master/tests/test_async_cached_property.py
is blowing up for you. Looking into it now and hope to have a release out in a day or so.
Thanks a lot!
Did the changes I make suffice? Should I cut a new release?
Fixed it. See https://travis-ci.org/pydanny/cached-property/builds/363898446
Am cutting release 1.4.2.