summaryrefslogtreecommitdiff
path: root/dev-python/odfpy/files/odfpy-0.9.4-tests.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/odfpy/files/odfpy-0.9.4-tests.patch')
-rw-r--r--dev-python/odfpy/files/odfpy-0.9.4-tests.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/dev-python/odfpy/files/odfpy-0.9.4-tests.patch b/dev-python/odfpy/files/odfpy-0.9.4-tests.patch
new file mode 100644
index 00000000000..1c0be00af5a
--- /dev/null
+++ b/dev-python/odfpy/files/odfpy-0.9.4-tests.patch
@@ -0,0 +1,32 @@
+--- tests/testxmlgen.py
++++ tests/testxmlgen.py
+@@ -20,6 +20,7 @@
+
+ import xml.sax, xml.sax.saxutils
+ import StringIO
++import sys
+ import unittest
+
+ class MyGen(xml.sax.saxutils.XMLGenerator):
+@@ -70,14 +71,16 @@
+ <a:greetings xmlns:a="http://example.com/ns">
+ <a:greet xml:lang="en">Hello world</a:greet>
+ </a:greetings>"""
+- parser.feed(testcontent)
+- parser.close()
+- expectedresult="""<?xml version="1.0" encoding="utf-8"?>
++ if sys.version_info < (2, 7):
++ self.assertRaises(KeyError, parser.feed, testcontent)
++ else:
++ parser.feed(testcontent)
++ parser.close()
++ expectedresult="""<?xml version="1.0" encoding="utf-8"?>
+ <a:greetings xmlns:a="http://example.com/ns">
+ <a:greet xml:lang="en">Hello world</a:greet>
+ </a:greetings>"""
+- self.assertEqual( outfp.getvalue(), expectedresult)
+-# self.assertRaises(KeyError, parser.feed, testcontent)
++ self.assertEqual( outfp.getvalue(), expectedresult)
+
+ def test_myxml(self):
+ """ Test that my patch works """