def test_ptp_init_parser_tool_ioerror(self): PTP.supported = {'mock': [MockParserIOError]} my_ptp = PTP(tool_name='mock') my_ptp._init_parser() self.assertIsNone(my_ptp.parser)
def test_ptp_init_parser_tool(self): PTP.supported = {'mock': [MockParser]} my_ptp = PTP(tool_name='mock') my_ptp._init_parser() self.assertTrue(my_ptp.parser is not None)
def test_ptp_init_parser_tool_version_not_supported(self): PTP.supported = {'mock': [MockParserVersionNotSupported]} my_ptp = PTP(tool_name='mock') my_ptp._init_parser() self.assertIsNone(my_ptp.parser)
def test_ptp_init_parser_no_tool(self): my_ptp = PTP() my_ptp._init_parser() self.assertIsNone(my_ptp.parser)