* [gentoo-commits] gentoo-x86 commit in dev-python/odfpy/files: odfpy-0.9.4-tests.patch
@ 2011-12-15 2:29 Mike Gilbert (floppym)
0 siblings, 0 replies; only message in thread
From: Mike Gilbert (floppym) @ 2011-12-15 2:29 UTC (permalink / raw
To: gentoo-commits
floppym 11/12/15 02:29:04
Added: odfpy-0.9.4-tests.patch
Log:
Version bump based on work by Arfrever in Progress overlay. Resolves bug 389631 by Ian Delaney.
(Portage version: 2.2.0_alpha81/cvs/Linux x86_64)
Revision Changes Path
1.1 dev-python/odfpy/files/odfpy-0.9.4-tests.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/odfpy/files/odfpy-0.9.4-tests.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/odfpy/files/odfpy-0.9.4-tests.patch?rev=1.1&content-type=text/plain
Index: odfpy-0.9.4-tests.patch
===================================================================
--- 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 """
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-12-15 2:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-15 2:29 [gentoo-commits] gentoo-x86 commit in dev-python/odfpy/files: odfpy-0.9.4-tests.patch Mike Gilbert (floppym)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox