ojii / pymaging

Pure Python imaging library with Python 2.6, 2.7, 3.1+ support

Home Page:http://pymaging.rtfd.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tests don't work on Python 2.6

mgorny opened this issue · comments

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:

  1. Use unittest2.TestCase as base class in Python 2.6,
  2. Re-implement it in pymaging in Python 2.6,
  3. Replace its use with assertTrue(isinstance(...)) or something similar.

Thanks for reporting, fixed.