Skipping tests on windows where NameTemporaryFile is used.
Should go back and revisit this, see if something else can be done.
This commit is contained in:
parent
b0fe45b733
commit
6c7cab5a47
2 changed files with 9 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
import doctest
|
import doctest
|
||||||
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
import xml.etree.cElementTree as ET
|
import xml.etree.cElementTree as ET
|
||||||
import unittest
|
import unittest
|
||||||
|
|
@ -290,6 +291,8 @@ class TestXML(unittest.TestCase):
|
||||||
with self.assertRaises((IOError, OSError)) as ce:
|
with self.assertRaises((IOError, OSError)) as ce:
|
||||||
xmlb = glymur.jp2box.XMLBox(filename=self.xmlfile, xml=xml_object)
|
xmlb = glymur.jp2box.XMLBox(filename=self.xmlfile, xml=xml_object)
|
||||||
|
|
||||||
|
@unittest.skipIf(os.name == "nt",
|
||||||
|
"Problems using NamedTemporaryFile on windows.")
|
||||||
def test_basic_xml(self):
|
def test_basic_xml(self):
|
||||||
# Should be able to write an XMLBox.
|
# Should be able to write an XMLBox.
|
||||||
j2k = Jp2k(self.j2kfile)
|
j2k = Jp2k(self.j2kfile)
|
||||||
|
|
@ -310,6 +313,8 @@ class TestXML(unittest.TestCase):
|
||||||
self.assertEqual(ET.tostring(jp2.box[3].xml),
|
self.assertEqual(ET.tostring(jp2.box[3].xml),
|
||||||
b'<data>0</data>')
|
b'<data>0</data>')
|
||||||
|
|
||||||
|
@unittest.skipIf(os.name == "nt",
|
||||||
|
"Problems using NamedTemporaryFile on windows.")
|
||||||
def test_xml_from_file(self):
|
def test_xml_from_file(self):
|
||||||
j2k = Jp2k(self.j2kfile)
|
j2k = Jp2k(self.j2kfile)
|
||||||
|
|
||||||
|
|
@ -354,6 +359,8 @@ class TestColourSpecificationBox(unittest.TestCase):
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@unittest.skipIf(os.name == "nt",
|
||||||
|
"Problems using NamedTemporaryFile on windows.")
|
||||||
def test_color_specification_box_with_out_enumerated_colorspace(self):
|
def test_color_specification_box_with_out_enumerated_colorspace(self):
|
||||||
j2k = Jp2k(self.j2kfile)
|
j2k = Jp2k(self.j2kfile)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -781,6 +781,8 @@ class TestPrinting(unittest.TestCase):
|
||||||
expected = '\n'.join(lines)
|
expected = '\n'.join(lines)
|
||||||
self.assertEqual(actual, expected)
|
self.assertEqual(actual, expected)
|
||||||
|
|
||||||
|
@unittest.skipIf(os.name == "nt",
|
||||||
|
"Problems using NamedTemporaryFile on windows.")
|
||||||
def test_less_common_boxes(self):
|
def test_less_common_boxes(self):
|
||||||
with tempfile.NamedTemporaryFile(suffix='.jp2') as tfile:
|
with tempfile.NamedTemporaryFile(suffix='.jp2') as tfile:
|
||||||
with open(self.jp2file, 'rb') as ifile:
|
with open(self.jp2file, 'rb') as ifile:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue