def test_data_files_are_valid(data_files):
    for data in data_files():
        assert isinstance(PlaceSchema().load(data), Place)
def ma_precincts():
    with open("data/ma-precincts.yml") as f:
        ma_yaml = yaml.safe_load(f)
    return PlaceSchema().load(ma_yaml)
Esempio n. 3
0
def test_data_files_are_valid(data_files):
    for data in data_files():
        assert all(
            isinstance(units, Units)
            for units in PlaceSchema().load(data)["units"])
def lowell():
    with open("data/lowell.yml") as f:
        lowell_yaml = yaml.safe_load(f)
    return PlaceSchema().load(lowell_yaml)
Esempio n. 5
0
def mass():
    with open("data/massachusetts.yml") as f:
        ma_yaml = yaml.safe_load(f)
    return PlaceSchema().load(ma_yaml)