def test_full_trace(self, mock_widget_inputs): mock_widget_inputs['is_full_trace'] = False assert u.verify_input(mock_widget_inputs) == True mock_widget_inputs['is_full_trace'] = True assert u.verify_input(mock_widget_inputs) == True
def test_output_name(self, mock_widget_inputs, output_name, expected): mock_widget_inputs['o_name'] = output_name assert u.verify_input(mock_widget_inputs) == expected
def test_executable_file(self, mock_widget_inputs): mock_widget_inputs['e_file'] = INCORRECT_VAL # File not found assert u.verify_input(mock_widget_inputs) == False
def test_cwd_path_parsing(self, mock_widget_inputs, cwd_path, expected): mock_widget_inputs['cwd_path'] = cwd_path u.verify_input(mock_widget_inputs) assert mock_widget_inputs['display_path'] == expected
def test_incorrect_cwd_path(self, mock_widget_inputs): mock_widget_inputs['cwd_path'] = INCORRECT_VAL assert u.verify_input(mock_widget_inputs) == False
def test_numerical_inputs(self, mock_widget_inputs, cache_lines, e0, cache_block, e1, output_lines, e2): mock_widget_inputs['c_lines'] = cache_lines mock_widget_inputs['c_block'] = cache_block mock_widget_inputs['m_lines'] = output_lines assert u.verify_input(mock_widget_inputs) == (e0 and e1 and e2)