~osomon/pyexiv2/pyexiv2-0.3

« back to all changes in this revision

Viewing changes to test/ReadMetadataTestCase.py

  • Committer: Olivier Tilloy
  • Date: 2010-12-08 20:45:01 UTC
  • Revision ID: olivier@tilloy.net-20101208204501-dsaxj4tfyeptqt30
Use isinstance(…) instead of type(…) everywhere, as recommended by Python’s documentation
(http://docs.python.org/library/functions.html#type).

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    """
39
39
 
40
40
    def check_type_and_value(self, tag, etype, evalue):
41
 
        self.assertEqual(type(tag.value), etype)
 
41
        self.assert_(isinstance(tag.value, etype))
42
42
        self.assertEqual(tag.value, evalue)
43
43
 
44
44
    def check_type_and_values(self, tag, etype, evalues):
45
45
        for value in tag.value:
46
 
            self.assertEqual(type(value), etype)
 
46
            self.assert_(isinstance(value, etype))
47
47
        self.assertEqual(tag.value, evalues)
48
48
 
49
49
    def assertCorrectFile(self, filename, md5sum):