def test_if_libdoc_is_not_generated_in_separate_process_for_non_ascii_chars_in_error_library_path(self): parent_path = os.path.dirname(os.path.realpath(__file__)) response = create_libdoc_in_separate_process("LibError", 'XML', [os.path.join(parent_path, 'res_test_robot_session_server', 'żółw')], []) self.assertEqual(response['result'], None) self.assertTrue('SyntaxError: ' in response['exception'])
def test_if_libdoc_is_not_generated_in_separate_process_for_non_ascii_chars_in_library_path(self): parent_path = os.path.dirname(os.path.realpath(__file__)) timeout_duration = 5 if 'Jython' not in platform.python_implementation() else 20 response = create_libdoc_in_separate_process("żółw", 'XML', [os.path.join(parent_path, 'res_test_robot_session_server', 'żółw')], [], timeout_duration) self.assertTrue('UnicodeDecodeError', response['exception'])
def test_if_libdoc_is_generated_in_separate_process_for_library_with_logger(self): parent_path = os.path.dirname(os.path.realpath(__file__)) python_paths = [os.path.join(parent_path, 'res_test_robot_session_server', 'a')] timeout_duration = 5 if 'Jython' not in platform.python_implementation() else 20 response = create_libdoc_in_separate_process("lib_logger", 'XML', python_paths, [], timeout_duration) self.assertNotEqual(response["result"], None)
def test_if_libdoc_is_not_generated_in_separate_process_for_hanging_module_importing(self): parent_path = os.path.dirname(os.path.realpath(__file__)) python_paths = [os.path.join(parent_path, 'res_test_robot_session_server')] timeout_duration = 5 if 'Jython' not in platform.python_implementation() else 20 response = create_libdoc_in_separate_process("c.HangingInit", 'XML', python_paths, [], timeout_duration) self.assertTrue('Libdoc not generated due to timeout' in response['exception'])
def test_if_libdoc_is_not_generated_in_separate_process_and_exception_is_thrown_for_library_with_error(self): parent_path = os.path.dirname(os.path.realpath(__file__)) timeout_duration = 5 if 'Jython' not in platform.python_implementation() else 20 response = create_libdoc_in_separate_process("LibError", 'XML', [os.path.join(parent_path, 'res_test_robot_session_server')], [], timeout_duration) self.assertEqual(response['result'], None) self.assertTrue('SyntaxError: ' in response['exception'])
def test_if_libdoc_is_generated_in_separate_process_for_non_ascii_chars_in_library_path( self): parent_path = os.path.dirname(os.path.realpath(__file__)) response = create_libdoc_in_separate_process("lib", 'XML', [ os.path.join(parent_path, 'res_test_robot_session_server', 'żółw') ], []) self.assertNotEqual(response['result'], None)