Example #1
0
 def testCase(self):
     cases = [
         glyph.node("doc", attributes=dict(aa=1, b="toot")),
         glyph.form("http://example.org", values=["a", "b"]),
         glyph.link("http://toot.org"),
     ]
     for c in cases:
         self.assertEqual(c, glyph.parse(glyph.dump(c)))
Example #2
0
 def testCase(self):
     cases = [
         1,
         1.0,
         "foo",
         u"bar",
         [],
         ["a", 1, [2]],
         None,
         True,
         False,
         {"a": 1, 1: "b", 5.4: "x"},
         set([1, 2, 3]),
         glyph.utcnow(),
     ]
     for c in cases:
         self.assertEqual(c, glyph.parse(glyph.dump(c)))
Example #3
0
 def testCase(self):
     cases = [
         1,
         1.0,
         "foo",
         u"bar",
         [],
         ['a',1,[2]],
         None,
         True,
         False,
         {'a':1},
         set([1,2,3]),
         glyph.utcnow(),
     ]
     for c in cases:
         self.assertEqual(c, glyph.parse(glyph.dump(c)))