-
Notifications
You must be signed in to change notification settings - Fork 11
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 #87 from MIERUNE/testing
Testing
- Loading branch information
Showing
4 changed files
with
53 additions
and
21 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
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,9 @@ | ||
from gtfs_go_labeling import get_labeling_for_stops | ||
|
||
|
||
def test_get_labeling_for_stops(): | ||
labeling = get_labeling_for_stops() | ||
assert labeling.settings().fieldName == "stop_name" # default value | ||
|
||
labeling = get_labeling_for_stops("testname") | ||
assert labeling.settings().fieldName == "testname" |
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,20 @@ | ||
from repository.japan_dpf import api | ||
|
||
|
||
def test_get_feeds_valid(): | ||
feeds = api.get_feeds("2024-08-01") | ||
assert len(feeds) > 0 | ||
|
||
feeds = api.get_feeds("2024-08-01", extent="139.7,35.6,139.8,35.7", pref="6") | ||
assert len(feeds) > 0 | ||
|
||
|
||
def test_get_feeds_invalid(): | ||
feeds = api.get_feeds("2024-08-01", pref="48") # 48 is invalid pref | ||
assert len(feeds) == 0 | ||
|
||
feeds = api.get_feeds("2000-08-01") # too old | ||
assert len(feeds) == 0 | ||
|
||
feeds = api.get_feeds("2024-08-01", extent="0,0,0,0") # null island | ||
assert len(feeds) == 0 |