~osomon/pyexiv2/pyexiv2-0.3

« back to all changes in this revision

Viewing changes to test/ReadMetadataTestCase.py

  • Committer: Olivier Tilloy
  • Date: 2010-04-14 11:22:41 UTC
  • mfrom: (301.1.7 run_tests)
  • Revision ID: olivier@tilloy.net-20100414112241-m2mszedhi42appra
Add a "test" scons target to run the unit tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
        """
59
59
        # Check that the reference file is not corrupted
60
60
        filename = os.path.join('data', 'smiley1.jpg')
 
61
        filepath = testutils.get_absolute_file_path(filename)
61
62
        md5sum = 'c066958457c685853293058f9bf129c1'
62
 
        self.assertCorrectFile(filename, md5sum)
 
63
        self.assertCorrectFile(filepath, md5sum)
63
64
 
64
65
        # Read the image metadata
65
 
        image = pyexiv2.ImageMetadata(filename)
 
66
        image = pyexiv2.ImageMetadata(filepath)
66
67
        image.read()
67
68
 
68
69
        # Exhaustive tests on the values of EXIF metadata
100
101
 
101
102
    def testReadMetadataXMP(self):
102
103
        filename = os.path.join('data', 'exiv2-bug540.jpg')
 
104
        filepath = testutils.get_absolute_file_path(filename)
103
105
        md5sum = '64d4b7eab1e78f1f6bfb3c966e99eef2'
104
 
        self.assertCorrectFile(filename, md5sum)
 
106
        self.assertCorrectFile(filepath, md5sum)
105
107
 
106
108
        # Read the image metadata
107
 
        image = pyexiv2.ImageMetadata(filename)
 
109
        image = pyexiv2.ImageMetadata(filepath)
108
110
        image.read()
109
111
 
110
112
        xmpTags = [('Xmp.dc.creator', list, [u'Ian Britton']),