Skip to content

Commit

Permalink
test: allow sql split test to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Dec 2, 2023
1 parent b88fbe7 commit 3cca38c
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions tests/test_splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import geojson

from fmtm_splitter.splitter import split_by_features, split_by_square
from fmtm_splitter.splitter import split_by_features, split_by_sql, split_by_square

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -84,15 +84,16 @@ def test_split_by_features_geojson(aoi_json):
assert len(features.get("features")) == 4


# def test_split_by_sql_fmtm(aoi_json, extract_json):
# """Test divide by square from geojson file."""
# features = split_by_sql(
# aoi_json,
# "postgresql://fmtm:dummycipassword@db:5432/splitter",
# num_buildings=5,
# osm_extract=extract_json,
# )
# assert False
def test_split_by_sql_fmtm(aoi_json, extract_json):
"""Test divide by square from geojson file."""
features = split_by_sql(
aoi_json,
"postgresql://fmtm:dummycipassword@db:5432/splitter",
num_buildings=5,
osm_extract=extract_json,
)
print(features)
# TODO fix me once features returned


# TODO add test for custom sql split

0 comments on commit 3cca38c

Please sign in to comment.