예제 #1
0
def test_check_protocol_version_2(tc):
    channel = Preprogrammed_gtp_channel("= 1\n\n? error\n\n# unreached\n\n")
    controller = Gtp_controller(channel, 'pv2 test')
    with tc.assertRaises(BadGtpResponse) as ar:
        controller.check_protocol_version()
    tc.assertEqual(str(ar.exception), "pv2 test reports GTP protocol version 1")
    tc.assertEqual(ar.exception.gtp_error_message, None)
    # check error is not treated as a check failure
    controller.check_protocol_version()
예제 #2
0
def test_check_protocol_version_2(tc):
    channel = Preprogrammed_gtp_channel("= 1\n\n? error\n\n# unreached\n\n")
    controller = Gtp_controller(channel, 'pv2 test')
    with tc.assertRaises(BadGtpResponse) as ar:
        controller.check_protocol_version()
    tc.assertEqual(str(ar.exception),
                   "pv2 test reports GTP protocol version 1")
    tc.assertEqual(ar.exception.gtp_error_message, None)
    # check error is not treated as a check failure
    controller.check_protocol_version()
예제 #3
0
def test_check_protocol_version(tc):
    channel = gtp_engine_fixtures.get_test_channel()
    controller = Gtp_controller(channel, 'pv test')
    controller.check_protocol_version()
예제 #4
0
def test_check_protocol_version(tc):
    channel = gtp_engine_fixtures.get_test_channel()
    controller = Gtp_controller(channel, 'pv test')
    controller.check_protocol_version()