コード例 #1
0
ファイル: test_graph.py プロジェクト: stevearc/python-pike
 def test_enough_inputs(self):
     """ If node inputs are satisfied, validation succeeds """
     n = Node("a") | Node("b")
     n.validate()
コード例 #2
0
ファイル: test_graph.py プロジェクト: stevearc/python-pike
 def test_not_enough_inputs(self):
     """ If node has insufficient inputs, it fails to validate """
     n = Node("a")
     with self.assertRaises(ValidationError):
         n.validate()
     n.validate(False)