forked from OpenTransitTools/gtfsdb
-
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.
Added unit test to exercise load api
- uses validated example of GTFS `sample-feed.zip`
- Loading branch information
Showing
5 changed files
with
28 additions
and
11 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 |
---|---|---|
@@ -1,2 +0,0 @@ | ||
# Need some useful tests here | ||
from gtfsdb import * | ||
Binary file not shown.
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,17 @@ | ||
import os | ||
from pkg_resources import resource_filename | ||
import sys | ||
if sys.version_info[:2] == (2, 6): | ||
import unittest2 as unittest | ||
else: | ||
import unittest | ||
|
||
from gtfsdb.scripts.load import load | ||
|
||
|
||
class TestLoad(unittest.TestCase): | ||
|
||
def test_load(self): | ||
path = resource_filename('gtfsdb', 'tests') | ||
filename = 'file:///{0}'.format(os.path.join(path, 'sample-feed.zip')) | ||
load(filename) |