def test_aws_instance_type_ab_other():
    with pytest.raises(SkipException):
        AWSInstanceType(context_wrap(AWS_TYPE_AB_1))

    with pytest.raises(SkipException):
        AWSInstanceType(context_wrap(AWS_TYPE_AB_2))

    with pytest.raises(SkipException):
        AWSInstanceType(context_wrap(AWS_TYPE_AB_3))

    with pytest.raises(ParseException) as pe:
        AWSInstanceType(context_wrap(AWS_TYPE_AB_4))
        assert 'Unrecognized type' in str(pe)
def test_doc_examples():
    env = {
            'aws_inst': AWSInstanceType(context_wrap(AWS_TYPE))
          }
    failed, total = doctest.testmod(aws_instance_type, globs=env)
    assert failed == 0
def test_aws_instance_type():
    aws = AWSInstanceType(context_wrap(AWS_TYPE))
    assert aws.type == "R3"
    assert aws.raw == "r3.xlarge"
    assert 'large' in str(aws)
def test_aws_instance_type_ab_empty():
    with pytest.raises(SkipException):
        AWSInstanceType(context_wrap(''))