Skip to content

Commit

Permalink
Add E2E testing
Browse files Browse the repository at this point in the history
  • Loading branch information
chazeon committed Oct 18, 2023
1 parent 241388c commit 2744297
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/test_cij_cli_run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import pytest
from pathlib import Path
from os import getcwd, chdir

settings = [
"examples/diopside/settings.yaml",
"examples/bridgmanite/settings.yaml",
"examples/akimotoite/settings.yaml",
]

@pytest.mark.parametrize("settings", settings)
def test_cij_run_with_example(cli_runner, settings):
import cij.cli.main
settings = Path(settings)
working_dir = str(settings.parent)
settings_fname = settings.name
cwd = getcwd()
chdir(working_dir)
result = cli_runner.invoke(cij.cli.main.main, [settings_fname])
chdir(cwd)

assert result.exit_code == 0

0 comments on commit 2744297

Please sign in to comment.