Updated tests to work with ElementTree objects only. Closes #82.
This commit is contained in:
parent
769dc23cdc
commit
2d38222117
2 changed files with 5 additions and 5 deletions
|
|
@ -365,7 +365,7 @@ class TestXML(unittest.TestCase):
|
||||||
j2k.wrap(tfile.name, boxes=boxes)
|
j2k.wrap(tfile.name, boxes=boxes)
|
||||||
jp2 = Jp2k(tfile.name)
|
jp2 = Jp2k(tfile.name)
|
||||||
self.assertEqual(jp2.box[3].box_id, 'xml ')
|
self.assertEqual(jp2.box[3].box_id, 'xml ')
|
||||||
self.assertEqual(ET.tostring(jp2.box[3].xml),
|
self.assertEqual(ET.tostring(jp2.box[3].xml.getroot()),
|
||||||
b'<data>0</data>')
|
b'<data>0</data>')
|
||||||
|
|
||||||
@unittest.skipIf(os.name == "nt",
|
@unittest.skipIf(os.name == "nt",
|
||||||
|
|
|
||||||
|
|
@ -4021,7 +4021,7 @@ class TestSuiteDump(unittest.TestCase):
|
||||||
self.assertEqual(jp2.box[1].compatibility_list[1], 'jp2 ')
|
self.assertEqual(jp2.box[1].compatibility_list[1], 'jp2 ')
|
||||||
|
|
||||||
# XML box
|
# XML box
|
||||||
tags = [x.tag for x in jp2.box[2].xml]
|
tags = [x.tag for x in jp2.box[2].xml.getroot()]
|
||||||
self.assertEqual(tags,
|
self.assertEqual(tags,
|
||||||
['{http://www.jpeg.org/jpx/1.0/xml}'
|
['{http://www.jpeg.org/jpx/1.0/xml}'
|
||||||
+ 'GENERAL_CREATION_INFO'])
|
+ 'GENERAL_CREATION_INFO'])
|
||||||
|
|
@ -4046,7 +4046,7 @@ class TestSuiteDump(unittest.TestCase):
|
||||||
self.assertEqual(jp2.box[3].box[1].colorspace, glymur.core.SRGB)
|
self.assertEqual(jp2.box[3].box[1].colorspace, glymur.core.SRGB)
|
||||||
|
|
||||||
# XML box
|
# XML box
|
||||||
tags = [x.tag for x in jp2.box[4].xml]
|
tags = [x.tag for x in jp2.box[4].xml.getroot()]
|
||||||
self.assertEqual(tags, ['{http://www.jpeg.org/jpx/1.0/xml}CAPTION',
|
self.assertEqual(tags, ['{http://www.jpeg.org/jpx/1.0/xml}CAPTION',
|
||||||
'{http://www.jpeg.org/jpx/1.0/xml}LOCATION',
|
'{http://www.jpeg.org/jpx/1.0/xml}LOCATION',
|
||||||
'{http://www.jpeg.org/jpx/1.0/xml}EVENT'])
|
'{http://www.jpeg.org/jpx/1.0/xml}EVENT'])
|
||||||
|
|
@ -4376,13 +4376,13 @@ class TestSuiteDump(unittest.TestCase):
|
||||||
self.assertIsNone(jp2.box[2].box[1].colorspace)
|
self.assertIsNone(jp2.box[2].box[1].colorspace)
|
||||||
|
|
||||||
# XML box
|
# XML box
|
||||||
tags = [x.tag for x in jp2.box[3].xml]
|
tags = [x.tag for x in jp2.box[3].xml.getroot()]
|
||||||
self.assertEqual(tags,
|
self.assertEqual(tags,
|
||||||
['{http://www.jpeg.org/jpx/1.0/xml}'
|
['{http://www.jpeg.org/jpx/1.0/xml}'
|
||||||
+ 'GENERAL_CREATION_INFO'])
|
+ 'GENERAL_CREATION_INFO'])
|
||||||
|
|
||||||
# XML box
|
# XML box
|
||||||
tags = [x.tag for x in jp2.box[5].xml]
|
tags = [x.tag for x in jp2.box[5].xml.getroot()]
|
||||||
self.assertEqual(tags,
|
self.assertEqual(tags,
|
||||||
['{http://www.jpeg.org/jpx/1.0/xml}CAPTION',
|
['{http://www.jpeg.org/jpx/1.0/xml}CAPTION',
|
||||||
'{http://www.jpeg.org/jpx/1.0/xml}LOCATION',
|
'{http://www.jpeg.org/jpx/1.0/xml}LOCATION',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue