本文整理匯總了Python中normalize.FieldSelector.from_path方法的典型用法代碼示例。如果您正苦於以下問題:Python FieldSelector.from_path方法的具體用法?Python FieldSelector.from_path怎麽用?Python FieldSelector.from_path使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類normalize.FieldSelector
的用法示例。
在下文中一共展示了FieldSelector.from_path方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_path_marshal
# 需要導入模塊: from normalize import FieldSelector [as 別名]
# 或者: from normalize.FieldSelector import from_path [as 別名]
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)