summaryrefslogtreecommitdiff
path: root/test/test_xmlutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_xmlutils.py')
-rw-r--r--test/test_xmlutils.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/test/test_xmlutils.py b/test/test_xmlutils.py
index 3d82da9..92a058d 100644
--- a/test/test_xmlutils.py
+++ b/test/test_xmlutils.py
@@ -26,7 +26,7 @@ class ProcessingInstructionDataParsingTest(TestCase):
"""
Tests the parsing of the data of an empty processing instruction.
"""
- pi_data = u" \t \n "
+ pi_data = " \t \n "
data = parse_pi_data(pi_data)
self.assertEqual(data, {})
@@ -35,41 +35,39 @@ class ProcessingInstructionDataParsingTest(TestCase):
Tests the parsing of the data of a simple processing instruction using
double quotes for embedding the value.
"""
- pi_data = u""" \t att="value"\n """
+ pi_data = """ \t att="value"\n """
data = parse_pi_data(pi_data)
- self.assertEqual(data, {u"att": u"value"})
+ self.assertEqual(data, {"att": "value"})
def test_simple_pi_with_simple_quotes(self):
"""
Tests the parsing of the data of a simple processing instruction using
simple quotes for embedding the value.
"""
- pi_data = u""" \t att='value'\n """
+ pi_data = """ \t att='value'\n """
data = parse_pi_data(pi_data)
- self.assertEqual(data, {u"att": u"value"})
+ self.assertEqual(data, {"att": "value"})
def test_complex_pi_with_different_quotes(self):
"""
Tests the parsing of the data of a complex processing instruction using
simple quotes or double quotes for embedding the values.
"""
- pi_data = u""" \t att='value'\n att2="value2" att3='value3'"""
+ pi_data = """ \t att='value'\n att2="value2" att3='value3'"""
data = parse_pi_data(pi_data)
- self.assertEqual(data, {u"att": u"value", u"att2": u"value2",
- u"att3": u"value3"})
+ self.assertEqual(data, {"att": "value", "att2": "value2", "att3": "value3"})
def test_pi_with_non_attribute_data(self):
"""
Tests the parsing of the data of a complex processing instruction
containing non-attribute data.
"""
- pi_data = u""" \t keyword att1="value1" """
+ pi_data = """ \t keyword att1="value1" """
data = parse_pi_data(pi_data)
- self.assertEqual(data, {u"keyword": None, u"att1": u"value1"})
+ self.assertEqual(data, {"keyword": None, "att1": "value1"})
# definitions for automatic unit testing
-if __name__ == '__main__':
+if __name__ == "__main__":
unittest_main()
-