コード例 #1
0
ファイル: test_yamlpath.py プロジェクト: wwkimball/yamlpath
 def test_pop_too_many(self):
     yp = YAMLPath("abc.def")
     with pytest.raises(YAMLPathException) as ex:
         for _ in range(5):
             yp.pop()
     assert -1 < str(ex.value).find("Cannot pop when")
コード例 #2
0
ファイル: test_yamlpath.py プロジェクト: wwkimball/yamlpath
 def test_pop_segments(self, path, pops, results):
     yp = YAMLPath(path)
     for pop in range(pops):
         assert results[pop] == yp.pop()