Skip to content

Commit

Permalink
Return to cwd after examples test
Browse files Browse the repository at this point in the history
  • Loading branch information
disrupted committed Jan 18, 2024
1 parent 38e989e commit 0a1d933
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/pipeline/test_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
EXAMPLES_PATH = Path("examples").absolute()


@pytest.mark.usefixtures("mock_env")
@pytest.mark.usefixtures("mock_env", "load_yaml_file_clear_cache")
class TestExample:
@pytest.fixture(scope="class", autouse=True)
def cd(self) -> None:
def cd(self):
cwd = Path.cwd().absolute()
os.chdir(EXAMPLES_PATH)
yield
os.chdir(cwd)

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

0 comments on commit 0a1d933

Please sign in to comment.