Exemplo n.º 1
0
def test_and_collections(collection_1, collection_2, collection_3,
                         collection_4):
    both = And(TagEquals('highway', 'residential'), TagEmpty('tiger:reviewed'))
    assert both.match(collection_1)
    assert not both.match(collection_2)
    assert not both.match(collection_3)
    assert both.match(collection_4)
Exemplo n.º 2
0
def test_and_ways(way_residential_no, way_residential, way_unclassified,
                  way_unclassified_no):
    both = And(TagEquals('highway', 'residential'), TagEmpty('tiger:reviewed'))
    assert both.match(way_residential)
    assert not both.match(way_residential_no)

    both = And(TagEquals('highway', 'residential'),
               TagEquals('tiger:reviewed', 'no'))
    assert both.match(way_residential_no)
    assert not both.match(way_residential)
    assert not both.match(way_unclassified_no)
Exemplo n.º 3
0
def test_and_ways(way_residential_no, way_residential, way_unclassified, way_unclassified_no):
    both = And(TagEquals('highway', 'residential'), TagEmpty('tiger:reviewed'))
    assert both.match(way_residential)
    assert not both.match(way_residential_no)

    both = And(TagEquals('highway', 'residential'), TagEquals('tiger:reviewed', 'no'))
    assert both.match(way_residential_no)
    assert not both.match(way_residential)
    assert not both.match(way_unclassified_no)
Exemplo n.º 4
0
def test_and_collections(collection_1, collection_2, collection_3, collection_4):
    both = And(TagEquals('highway', 'residential'), TagEmpty('tiger:reviewed'))
    assert both.match(collection_1)
    assert not both.match(collection_2)
    assert not both.match(collection_3)
    assert both.match(collection_4)