def test_store(self): fun = sys._getframe().f_code.co_name print("Run: %s.%s() " % (self.__class__.__name__, fun)) el = Element(self._tfname, self._fattrs2) el2 = EDimensions(self._fattrs2, el) self.assertEqual(el2.tagName, self._tfname) self.assertEqual(el2.content, []) self.assertEqual(el2._tagAttrs, self._fattrs2) self.assertEqual(el2.doc, "") self.assertEqual(el2.store(""), None) self.assertEqual(el2.last, el) self.assertEqual(el2.store("<tag/>"), None)
def test_store_beforeLast(self): fun = sys._getframe().f_code.co_name print("Run: %s.%s() " % (self.__class__.__name__, fun)) el = Element(self._tfname, self._fattrs, None) el2 = Element(self._tfname, self._fattrs, el) el3 = EDimensions(self._fattrs, el2) self.assertEqual(el.tagName, self._tfname) self.assertEqual(el.content, []) self.assertEqual(el._tagAttrs, self._fattrs) self.assertEqual(el.doc, "") self.assertEqual(el2.last, el) self.assertEqual(el2._beforeLast(), None) self.assertEqual(el3._beforeLast(), el) self.assertEqual(el3.store([None, "<tag/>", None]), None) self.assertEqual(el.doc, "") el3.last.doc = "SYM" self.assertEqual(el3.store(None), None) el2.doc = "SYM2" self.assertEqual(el3.store(None), None)