Example #1
0
def test_or_collections(collection_1, collection_2, collection_3,
                        collection_4):
    both = Or(TagEquals('highway', 'residential'), TagEmpty('tiger:reviewed'))
    assert both.match(collection_1)
    assert both.match(collection_2)
    assert both.match(collection_3)
    assert both.match(collection_4)

    both = Or(TagEquals('highway', 'residential'),
              TagEquals('tiger:reviewed', 'no'))
    assert both.match(collection_1)
    assert not both.match(collection_2)
    assert both.match(collection_3)
    assert both.match(collection_4)
Example #2
0
def test_or(way_residential_no, way_residential, way_unclassified,
            way_unclassified_no):
    both = Or(TagEquals('highway', 'residential'), TagEmpty('tiger:reviewed'))
    assert both.match(way_residential)
    assert both.match(way_residential_no)
    assert both.match(way_unclassified)
    assert not both.match(way_unclassified_no)
Example #3
0
def test_or_collections(collection_1, collection_2, collection_3, collection_4):
    both = Or(TagEquals('highway', 'residential'), TagEmpty('tiger:reviewed'))
    assert both.match(collection_1)
    assert both.match(collection_2)
    assert both.match(collection_3)
    assert both.match(collection_4)

    both = Or(TagEquals('highway', 'residential'), TagEquals('tiger:reviewed', 'no'))
    assert both.match(collection_1)
    assert not both.match(collection_2)
    assert both.match(collection_3)
    assert both.match(collection_4)
Example #4
0
def test_or(way_residential_no, way_residential, way_unclassified, way_unclassified_no):
    both = Or(TagEquals('highway', 'residential'), TagEmpty('tiger:reviewed'))
    assert both.match(way_residential)
    assert both.match(way_residential_no)
    assert both.match(way_unclassified)
    assert not both.match(way_unclassified_no)