Exemplo n.º 1
0
 def test_path_marshal(self):
     for path in (("foo", "bar"), (None, ), (None, "bob", 6, "frop"),
                  ("window", "setTimeout", "100"), ("wind0w", "setT1meout",
                                                    "_100"), (),
                  ("Bob", "one flew over the cuckoo's nest"),
                  ("Leaning", "toothpick", "syndrome",
                   "\\/\"/"), (u"\u2620", )):
         fs = FieldSelector(path)
         fs_path = fs.path
         fs_2 = FieldSelector.from_path(fs_path)
         self.assertEqual(fs.path, fs_2.path)
         self.assertEqual(fs.selectors, fs_2.selectors)
Exemplo n.º 2
0
 def test_path_marshal(self):
     for path in (
         ("foo", "bar"),
         (None, ),
         (None, "bob", 6, "frop"),
         (),
         ("Bob", "one flew over the cuckoo's nest"),
         ("Leaning", "toothpick", "syndrome", "\\/\"/"),
         (u"\u2620",)
     ):
         fs = FieldSelector(path)
         fs_path = fs.path
         fs_2 = FieldSelector.from_path(fs_path)
         self.assertEqual(fs.path, fs_2.path)
         self.assertEqual(fs.selectors, fs_2.selectors)