コード例 #1
0
ファイル: test_core.py プロジェクト: trb116/pythonanalyzer
 def test_enabled_and_wrong_output_type(self):
     with patch('lusmu.core.VERIFY_OUTPUT_TYPES', True):
         with assert_raises(TypeError) as exc:
             node = Node(name='node',
                         action=IntOutputTypeAction(),
                         inputs=Node.inputs(self.input))
             self.input.value = '42'
             node._evaluate()
         self.assertEqual(
             "The output value type 'str' for [node]\n"
             "doesn't match the expected type 'int' for action "
             '"int_action".', str(exc.exception))
コード例 #2
0
ファイル: test_core.py プロジェクト: trb116/pythonanalyzer
 def test_disabled_and_wrong_output_type(self):
     node = Node(action=IntOutputTypeAction(),
                 inputs=Node.inputs(self.input))
     self.input.value = '42'
     node._evaluate()
コード例 #3
0
ファイル: test_core.py プロジェクト: trb116/pythonanalyzer
 def test_enabled_and_correct_output_type(self):
     with patch('lusmu.core.VERIFY_OUTPUT_TYPES', True):
         node = Node(action=IntOutputTypeAction(),
                     inputs=Node.inputs(self.input))
         self.input.value = 42
         node._evaluate()
コード例 #4
0
ファイル: test_core.py プロジェクト: trb116/pythonanalyzer
 def test_disabled_and_correct_output_type(self):
     node = Node(action=IntOutputTypeAction(),
                 inputs=Node.inputs(self.input))
     self.input.value = 42
     node._evaluate()