Esempio n. 1
0
 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
Esempio n. 2
0
 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
Esempio n. 3
0
 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
Esempio n. 4
0
 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
Esempio n. 5
0
 def test_incorrect_cwd_path(self, mock_widget_inputs):
     mock_widget_inputs['cwd_path'] = INCORRECT_VAL
     assert u.verify_input(mock_widget_inputs) == False
Esempio n. 6
0
 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)