various #16
1 changed files with 13 additions and 22 deletions
|
|
@ -3,6 +3,7 @@ from pathlib import Path
|
|||
|
||||
import pytest
|
||||
|
||||
from pytest_abra import DirManager
|
||||
from pytest_abra.utils import load_json_to_environ
|
||||
|
||||
|
||||
|
|
@ -33,8 +34,8 @@ def test_abratest_cli_full_integration(session_tmp_path_testout: Path):
|
|||
# ----------------------------------- dirs ----------------------------------- #
|
||||
|
||||
RECIPES_DIR = Path("../recipes").resolve()
|
||||
OUTPUT_DIR = Path("./test-output").resolve()
|
||||
# OUTPUT_DIR = session_tmp_path_testout.resolve()
|
||||
# OUTPUT_DIR = Path("./test-output").resolve()
|
||||
OUTPUT_DIR = session_tmp_path_testout.resolve()
|
||||
|
||||
# ------------------------------------ run ----------------------------------- #
|
||||
|
||||
|
|
@ -47,27 +48,17 @@ def test_abratest_cli_full_integration(session_tmp_path_testout: Path):
|
|||
RECIPES_DIR,
|
||||
"--output_dir",
|
||||
OUTPUT_DIR,
|
||||
],
|
||||
capture_output=True,
|
||||
"--session_id",
|
||||
"abc",
|
||||
]
|
||||
)
|
||||
|
||||
with open(OUTPUT_DIR / "tempfile_stdout.txt", "w") as f:
|
||||
f.write(str(result.stdout))
|
||||
|
||||
with open(OUTPUT_DIR / "tempfile_stderr.txt", "w") as f:
|
||||
f.write(str(result.stderr))
|
||||
@pytest.mark.slow
|
||||
def test_results_abra(session_tmp_path_testout: Path):
|
||||
OUTPUT_DIR = session_tmp_path_testout.resolve()
|
||||
|
||||
# print(result)
|
||||
|
||||
assert result.returncode == 0
|
||||
|
||||
assert "failed" not in str(result.stdout)
|
||||
|
||||
# assert False
|
||||
|
||||
|
||||
# @pytest.mark.slow
|
||||
# def test_results_abra(session_tmp_path_testout: Path):
|
||||
# OUTPUT_DIR = Path("./test-output").resolve()
|
||||
# print(list(OUTPUT_DIR.rglob("*")))
|
||||
# assert False
|
||||
DIR = DirManager(output_dir=OUTPUT_DIR, session_id="abc")
|
||||
all_files = list(DIR.STATUS.rglob("*"))
|
||||
passed_files = list(DIR.STATUS.rglob("passed-*"))
|
||||
assert len(all_files) == len(passed_files)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue