Skip to content

Commit 9b5f4f7

Browse files
committed
test - Basic test for geojson export
1 parent 64cdd84 commit 9b5f4f7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/test_export.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import pytest
2+
3+
import overpy
4+
from overpy import PY2
5+
from overpy.format import geojson
6+
7+
from tests.base_class import read_file
8+
9+
if PY2:
10+
from StringIO import StringIO
11+
else:
12+
from io import StringIO
13+
14+
15+
class TestGeoJSON(object):
16+
def test_node01(self):
17+
api = overpy.Overpass()
18+
result = api.parse_json(read_file("json/node-01.json"))
19+
fp = StringIO()
20+
geojson.dump(result, fp, nodes=True, ways=True)

0 commit comments

Comments
 (0)