Skip to content

Commit c25d59d

Browse files
committed
start stubbing out gtfs schedule validator tasks; doesn't run because of missing env var
1 parent c5a756d commit c25d59d

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

jobs/gtfs-schedule-validator/test_gtfs_schedule_validator.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
from pathlib import Path
22

3+
import pytest
34
import toml
4-
from gtfs_schedule_validator_hourly import __version__
5+
from gtfs_schedule_validator_hourly import __version__, app
6+
from typer.testing import CliRunner
57

68

79
def test_version():
@@ -20,3 +22,21 @@ def test_versions_are_in_sync():
2022
package_init_version = __version__
2123

2224
assert package_init_version == pyproject_version
25+
26+
27+
class TestGtfsScheduleValidator:
28+
@pytest.fixture
29+
def runner(self) -> CliRunner:
30+
return CliRunner()
31+
32+
def test_no_extracts(self, runner):
33+
hour_start = "2020-02-20T20:00"
34+
result = runner.invoke(
35+
app,
36+
[
37+
"validate-hour",
38+
hour_start,
39+
],
40+
)
41+
assert result.exit_code == 0
42+
assert "found 0 extracts to process, exiting" in result.stdout

0 commit comments

Comments
 (0)