Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
disrupted committed Jan 18, 2024
1 parent 542fbf9 commit f45b745
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions tests/pipeline/test_example.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import os
from pathlib import Path

import pytest
import yaml
from snapshottest.module import SnapshotTest
Expand All @@ -7,17 +10,24 @@

runner = CliRunner()

EXAMPLES_PATH = Path("examples").absolute()


@pytest.mark.usefixtures("mock_env")
class TestExample:
@pytest.fixture(autouse=True)
def cd(self) -> None:
os.chdir(EXAMPLES_PATH)

def test_cwd(self):
assert Path.cwd() == EXAMPLES_PATH

def test_atm_fraud(self, snapshot: SnapshotTest):
result = runner.invoke(
app,
[
"generate",
"./examples/bakdata/atm-fraud-detection/pipeline.yaml",
"--config",
"./examples/bakdata/atm-fraud-detection",
"atm-fraud/pipeline.yaml",
],
catch_exceptions=False,
)
Expand Down

0 comments on commit f45b745

Please sign in to comment.