Esempio n. 1
0
def _get_species_grades(species_name, grade_type):
    spec_tags = []
    if species_name:
        species = fo.getSpecies(species_name)
        if species:
            spec_tags = species.tags
        else:
            warn("get_species_grades() couldn't retrieve species '%s'\n" % species_name)
    return get_ai_tag_grade(spec_tags, grade_type)
def _get_species_grades(species_name, grade_type):
    spec_tags = []
    if species_name:
        species = fo.getSpecies(species_name)
        if species:
            spec_tags = species.tags
        else:
            print >> sys.stderr, "get_species_grades() couldn't retrieve species '%s'\n" % species_name
    return get_ai_tag_grade(spec_tags, grade_type)
Esempio n. 3
0
def _get_species_grades(species_name, grade_type):
    spec_tags = []
    if species_name:
        species = fo.getSpecies(species_name)
        if species:
            spec_tags = species.tags
        else:
            print >> sys.stderr, "get_species_grades() couldn't retrieve species '%s'\n" % species_name
    return get_ai_tag_grade(spec_tags, grade_type)
Esempio n. 4
0
def _get_species_grades(species_name, grade_type):
    spec_tags = []
    if species_name:
        species = fo.getSpecies(species_name)
        if species:
            spec_tags = species.tags
        else:
            sys.stderr.write("Error: get_species_grades couldn't retrieve species '%s'\n" % species_name)
    return get_ai_tag_grade(spec_tags, grade_type)
Esempio n. 5
0
def _get_species_grades(species_name, grade_type):
    spec_tags = []
    if species_name:
        species = fo.getSpecies(species_name)
        if species:
            spec_tags = species.tags
        else:
            warn("get_species_grades() couldn't retrieve species '%s'\n" %
                 species_name)
    return get_ai_tag_grade(spec_tags, grade_type)
Esempio n. 6
0
def test_tags_search_by_tag_type_with_underscore_returns_first_grade():
    assert 'GREAT' == get_ai_tag_grade(['GREAT_WEAPONS_TEST'], 'WEAPONS_TEST')
Esempio n. 7
0
def test_parse_weapon_tag_positive2():
    assert 'GREAT' == get_ai_tag_grade(['GREAT_MULTI_WORD_TAG'], 'MULTI_WORD_TAG')
def test_tags_search_by_not_matching_tag_type_returns_empty_string():
    assert "" == get_ai_tag_grade(["GOOD_HULL"], "WEAPONS")
Esempio n. 9
0
def test_parse_weapon_tag_negative2():
    assert '' == get_ai_tag_grade(['GREAT_WEAPONS'], 'WEAPON')
Esempio n. 10
0
def test_parse_weapon_tag_positive1():
    assert 'GREAT' == get_ai_tag_grade(['GREAT_WEAPONS'], 'WEAPONS')
def test_tags_search_by_tag_type_with_underscore_returns_first_grade():
    assert "GREAT" == get_ai_tag_grade(["GREAT_WEAPONS_TEST"], "WEAPONS_TEST")
Esempio n. 12
0
def test_parse_weapon_tag_negative1():
    assert '' == get_ai_tag_grade(['WEAPONS'], 'WEAPONS')
def test_parse_weapon_tag_positive1():
    assert 'GREAT' == get_ai_tag_grade(['GREAT_WEAPONS'], 'WEAPONS')
def test_parse_weapon_tag_negative1():
    assert '' == get_ai_tag_grade(['WEAPONS'], 'WEAPONS')
Esempio n. 15
0
def test_tags_search_by_tag_type_returns_grade(tags, tags_type):
    assert 'GREAT' == get_ai_tag_grade(tags, tags_type)
def test_very_bad_tag_parsing_find_correct_modifier():
    assert "VERY_BAD" == get_ai_tag_grade(["VERY_BAD_WEAPONS"], "WEAPONS")
def test_tags_search_by_substring_tag_type_returns_empty_string(
        tags, tags_type):
    assert "" == get_ai_tag_grade(tags, tags_type)
def test_parse_weapon_tag_negative2():
    assert '' == get_ai_tag_grade(['GREAT_WEAPONS'], 'WEAPON')
Esempio n. 19
0
def test_tags_search_by_not_matching_tag_type_returns_empty_string():
    assert '' == get_ai_tag_grade(['GOOD_HULL'], 'WEAPONS')
def test_parse_weapon_tag_positive2():
    assert 'GREAT' == get_ai_tag_grade(['GREAT_MULTI_WORD_TAG'],
                                       'MULTI_WORD_TAG')
Esempio n. 21
0
def test_lowercase_tags_search_by_tag_type_returns_empty_string(tags, tags_type):
    assert '' == get_ai_tag_grade(tags, tags_type)