-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from olincollege/SV-22-traffic-volume
Sv 22 traffic volume
- Loading branch information
Showing
6 changed files
with
63 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,3 @@ line-length = 88 | |
[build-system] | ||
requires = ["setuptools>=70.0.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import pytest | ||
import os | ||
from night_light.utils import query_geojson | ||
|
||
|
||
def test_save_boston_traffic_speed_geojson(boston_traffic_speed): | ||
""" | ||
Test saving Boston traffic speed data to a geojson | ||
""" | ||
geojson_name = "tests/test_road_speeds.geojson" | ||
saved_gdf = query_geojson.gpd.read_file(geojson_name) | ||
|
||
assert boston_traffic_speed.crs == saved_gdf.crs | ||
assert list(boston_traffic_speed.columns) == list(saved_gdf.columns) | ||
assert boston_traffic_speed.shape == saved_gdf.shape | ||
|
||
os.remove(geojson_name) | ||
assert not os.path.exists(geojson_name) |