Skip to content

Commit

Permalink
Add message if examples git submodule is not initialized (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
disrupted authored Jan 22, 2024
1 parent 6f47af1 commit 2f18b30
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/pipeline/test_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ def cd(self):
def test_cwd(self):
assert Path.cwd() == EXAMPLES_PATH

@pytest.fixture(scope="session")
def test_submodule(self):
assert any(
EXAMPLES_PATH.iterdir()
), "examples directory is empty, please initialize and update the git submodule (see contributing guide)"

@pytest.mark.usefixtures("test_submodule")
def test_word_count(self, snapshot: SnapshotTest):
result = runner.invoke(
app,
Expand All @@ -40,6 +47,7 @@ def test_word_count(self, snapshot: SnapshotTest):
enriched_pipeline: dict = yaml.safe_load(result.stdout)
snapshot.assert_match(enriched_pipeline, "word-count-pipeline")

@pytest.mark.usefixtures("test_submodule")
def test_atm_fraud(self, snapshot: SnapshotTest):
result = runner.invoke(
app,
Expand Down

0 comments on commit 2f18b30

Please sign in to comment.