Tests don't work on Python 2.6
mgorny opened this issue · comments
Michał Górny commented
ERROR: test_format_registration (pymaging.tests.test_basic.DrawTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/mgorny/git/pymaging/pymaging/tests/test_basic.py", line 301, in test_format_registration
self.assertIsInstance(img, Image)
AttributeError: 'DrawTests' object has no attribute 'assertIsInstance'
----------------------------------------------------------------------
The assertIsInstance()
function is not available in Python 2.6. Possible solutions:
- Use
unittest2.TestCase
as base class in Python 2.6, - Re-implement it in pymaging in Python 2.6,
- Replace its use with
assertTrue(isinstance(...))
or something similar.
Jonas Obrist commented
Thanks for reporting, fixed.