summaryrefslogtreecommitdiff
path: root/unit_tests/test_xunit.py
diff options
context:
space:
mode:
Diffstat (limited to 'unit_tests/test_xunit.py')
-rw-r--r--unit_tests/test_xunit.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/unit_tests/test_xunit.py b/unit_tests/test_xunit.py
index c141739..d98ccba 100644
--- a/unit_tests/test_xunit.py
+++ b/unit_tests/test_xunit.py
@@ -23,40 +23,6 @@ mktest.__test__ = False
time_taken = re.compile(r'\d\.\d\d')
-class TestEscaping(unittest.TestCase):
-
- def setUp(self):
- self.x = Xunit()
-
- def test_all(self):
- eq_(self.x._quoteattr(
- '''<baz src="http://foo?f=1&b=2" quote="inix hubris 'maximus'?" />'''),
- ('"&lt;baz src=&quot;http://foo?f=1&amp;b=2&quot; '
- 'quote=&quot;inix hubris \'maximus\'?&quot; /&gt;"'))
-
- def test_unicode_is_utf8_by_default(self):
- if not UNICODE_STRINGS:
- eq_(self.x._quoteattr(u'Ivan Krsti\u0107'),
- '"Ivan Krsti\xc4\x87"')
-
- def test_unicode_custom_utf16_madness(self):
- self.x.encoding = 'utf-16'
- utf16 = self.x._quoteattr(u'Ivan Krsti\u0107')[1:-1]
-
- if UNICODE_STRINGS:
- # If all internal strings are unicode, then _quoteattr shouldn't
- # have changed anything.
- eq_(utf16, u'Ivan Krsti\u0107')
- else:
- # to avoid big/little endian bytes, assert that we can put it back:
- eq_(utf16.decode('utf16'), u'Ivan Krsti\u0107')
-
- def test_control_characters(self):
- # quoting of \n, \r varies in diff. python versions
- n = saxutils.quoteattr('\n')[1:-1]
- r = saxutils.quoteattr('\r')[1:-1]
- eq_(self.x._quoteattr('foo\n\b\f\r'), '"foo%s??%s"' % (n, r))
- eq_(escape_cdata('foo\n\b\f\r'), 'foo\n??\r')
class TestSplitId(unittest.TestCase):