Back to index

python3.2  3.2.2
Public Member Functions
test.test_sax.XmlReaderTest Class Reference
Inheritance diagram for test.test_sax.XmlReaderTest:
Inheritance graph
[legend]
Collaboration diagram for test.test_sax.XmlReaderTest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_attrs_empty
def test_attrs_wattr
def test_nsattrs_empty
def test_nsattrs_wattr
def verify_empty_attrs
def verify_empty_nsattrs
def verify_attrs_wattr

Detailed Description

Definition at line 764 of file test_sax.py.


Member Function Documentation

Definition at line 767 of file test_sax.py.

00767 
00768     def test_attrs_empty(self):
00769         self.verify_empty_attrs(AttributesImpl({}))

Here is the call graph for this function:

Definition at line 770 of file test_sax.py.

00770 
00771     def test_attrs_wattr(self):
00772         self.verify_attrs_wattr(AttributesImpl({"attr" : "val"}))

Here is the call graph for this function:

Definition at line 773 of file test_sax.py.

00773 
00774     def test_nsattrs_empty(self):
00775         self.verify_empty_nsattrs(AttributesNSImpl({}, {}))

Here is the call graph for this function:

Definition at line 776 of file test_sax.py.

00776 
00777     def test_nsattrs_wattr(self):
00778         attrs = AttributesNSImpl({(ns_uri, "attr") : "val"},
00779                                  {(ns_uri, "attr") : "ns:attr"})
00780 
00781         self.assertEqual(attrs.getLength(), 1)
00782         self.assertEqual(attrs.getNames(), [(ns_uri, "attr")])
00783         self.assertEqual(attrs.getQNames(), ["ns:attr"])
00784         self.assertEqual(len(attrs), 1)
00785         self.assertIn((ns_uri, "attr"), attrs)
00786         self.assertEqual(list(attrs.keys()), [(ns_uri, "attr")])
00787         self.assertEqual(attrs.get((ns_uri, "attr")), "val")
00788         self.assertEqual(attrs.get((ns_uri, "attr"), 25), "val")
00789         self.assertEqual(list(attrs.items()), [((ns_uri, "attr"), "val")])
00790         self.assertEqual(list(attrs.values()), ["val"])
00791         self.assertEqual(attrs.getValue((ns_uri, "attr")), "val")
00792         self.assertEqual(attrs.getValueByQName("ns:attr"), "val")
00793         self.assertEqual(attrs.getNameByQName("ns:attr"), (ns_uri, "attr"))
00794         self.assertEqual(attrs[(ns_uri, "attr")], "val")
00795         self.assertEqual(attrs.getQNameByName((ns_uri, "attr")), "ns:attr")
00796 

Here is the call graph for this function:

def test.test_sax.XmlTestBase.verify_attrs_wattr (   self,
  attrs 
) [inherited]

Definition at line 65 of file test_sax.py.

00065 
00066     def verify_attrs_wattr(self, attrs):
00067         self.assertEqual(attrs.getLength(), 1)
00068         self.assertEqual(attrs.getNames(), ["attr"])
00069         self.assertEqual(attrs.getQNames(), ["attr"])
00070         self.assertEqual(len(attrs), 1)
00071         self.assertIn("attr", attrs)
00072         self.assertEqual(list(attrs.keys()), ["attr"])
00073         self.assertEqual(attrs.get("attr"), "val")
00074         self.assertEqual(attrs.get("attr", 25), "val")
00075         self.assertEqual(list(attrs.items()), [("attr", "val")])
00076         self.assertEqual(list(attrs.values()), ["val"])
00077         self.assertEqual(attrs.getValue("attr"), "val")
00078         self.assertEqual(attrs.getValueByQName("attr"), "val")
00079         self.assertEqual(attrs.getNameByQName("attr"), "attr")
00080         self.assertEqual(attrs["attr"], "val")
00081         self.assertEqual(attrs.getQNameByName("attr"), "attr")

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_sax.XmlTestBase.verify_empty_attrs (   self,
  attrs 
) [inherited]

Definition at line 31 of file test_sax.py.

00031 
00032     def verify_empty_attrs(self, attrs):
00033         self.assertRaises(KeyError, attrs.getValue, "attr")
00034         self.assertRaises(KeyError, attrs.getValueByQName, "attr")
00035         self.assertRaises(KeyError, attrs.getNameByQName, "attr")
00036         self.assertRaises(KeyError, attrs.getQNameByName, "attr")
00037         self.assertRaises(KeyError, attrs.__getitem__, "attr")
00038         self.assertEqual(attrs.getLength(), 0)
00039         self.assertEqual(attrs.getNames(), [])
00040         self.assertEqual(attrs.getQNames(), [])
00041         self.assertEqual(len(attrs), 0)
00042         self.assertNotIn("attr", attrs)
00043         self.assertEqual(list(attrs.keys()), [])
00044         self.assertEqual(attrs.get("attrs"), None)
00045         self.assertEqual(attrs.get("attrs", 25), 25)
00046         self.assertEqual(list(attrs.items()), [])
00047         self.assertEqual(list(attrs.values()), [])

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_sax.XmlTestBase.verify_empty_nsattrs (   self,
  attrs 
) [inherited]

Definition at line 48 of file test_sax.py.

00048 
00049     def verify_empty_nsattrs(self, attrs):
00050         self.assertRaises(KeyError, attrs.getValue, (ns_uri, "attr"))
00051         self.assertRaises(KeyError, attrs.getValueByQName, "ns:attr")
00052         self.assertRaises(KeyError, attrs.getNameByQName, "ns:attr")
00053         self.assertRaises(KeyError, attrs.getQNameByName, (ns_uri, "attr"))
00054         self.assertRaises(KeyError, attrs.__getitem__, (ns_uri, "attr"))
00055         self.assertEqual(attrs.getLength(), 0)
00056         self.assertEqual(attrs.getNames(), [])
00057         self.assertEqual(attrs.getQNames(), [])
00058         self.assertEqual(len(attrs), 0)
00059         self.assertNotIn((ns_uri, "attr"), attrs)
00060         self.assertEqual(list(attrs.keys()), [])
00061         self.assertEqual(attrs.get((ns_uri, "attr")), None)
00062         self.assertEqual(attrs.get((ns_uri, "attr"), 25), 25)
00063         self.assertEqual(list(attrs.items()), [])
00064         self.assertEqual(list(attrs.values()), [])

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: