def test_from_abbrev5():
    """
    Should return array with complete State name as the only element.
    """
    INPUT = "Asheville NC "
    EXPECTED = ["North Carolina"]

    OUTPUT = from_abbrev(INPUT)
    assert OUTPUT == EXPECTED
def test_from_abbrev6():
    """
    Should return array with complete State names as the elements.
    """
    INPUT = "San Diego (C.A.), Asheville (NC), Brookings S.d., Brooklyn  NY."
    EXPECTED = ["California", "North Carolina", "South Dakota", "New York"]

    OUTPUT = from_abbrev(INPUT)
    assert OUTPUT.sort() == EXPECTED.sort()
def test_from_abbrev3():
    """
    Should return array with complete State name as the only element.
    """
    INPUT = "San Diego, (CA)"
    EXPECTED = ["California"]

    OUTPUT = from_abbrev(INPUT)
    assert OUTPUT == EXPECTED
def test_from_abbrev4():
    """
    Should return array with complete State name as the only element.
    """
    INPUT = "Greenville, (S.C.)."
    EXPECTED = ["South Carolina"]

    OUTPUT = from_abbrev(INPUT)
    assert OUTPUT == EXPECTED
def test_from_abbrev6():
    """
    Should return array with complete State names as the elements.
    """
    INPUT = "San Diego (C.A.), Asheville (NC), Brookings S.d., Brooklyn  NY."
    EXPECTED = ["California", "North Carolina", "South Dakota", "New York"] 

    OUTPUT = from_abbrev(INPUT)
    assert OUTPUT.sort() == EXPECTED.sort()
def test_from_abbrev1():
    """
    "Ga." should produce Georgia but "in" should not produce Indiana
    """
    INPUT = "Athens in Ga."
    EXPECTED = ["Georgia"]

    OUTPUT = from_abbrev(INPUT)
    assert OUTPUT == EXPECTED
def test_from_abbrev5():
    """
    Should return array with complete State name as the only element.
    """
    INPUT = "Asheville NC "
    EXPECTED = ["North Carolina"]

    OUTPUT = from_abbrev(INPUT)
    assert OUTPUT == EXPECTED
def test_from_abbrev4():
    """
    Should return array with complete State name as the only element.
    """
    INPUT = "Greenville, (S.C.)."
    EXPECTED = ["South Carolina"]

    OUTPUT = from_abbrev(INPUT)
    assert OUTPUT == EXPECTED
def test_from_abbrev3():
    """
    Should return array with complete State name as the only element.
    """
    INPUT = "San Diego, (CA)"
    EXPECTED = ["California"]

    OUTPUT = from_abbrev(INPUT)
    assert OUTPUT == EXPECTED
def test_from_abbrev1():
    """
    "Ga." should produce Georgia but "in" should not produce Indiana
    """
    INPUT = "Athens in Ga."
    EXPECTED = ["Georgia"]

    OUTPUT = from_abbrev(INPUT)
    assert OUTPUT == EXPECTED
Esempio n. 11
0
def test_from_abbrev7():
    INPUT = "Cambridge, Mass."
    EXPECTED = ["Massachusetts"]

    OUTPUT = from_abbrev(INPUT)
    assert OUTPUT == EXPECTED
def test_from_abbrev7():
    INPUT = "Cambridge, Mass."
    EXPECTED = ["Massachusetts"]

    OUTPUT = from_abbrev(INPUT)
    assert OUTPUT == EXPECTED