Skip to content

Commit

Permalink
test: output test_clumpstep_summary_stats results to temp dir
Browse files Browse the repository at this point in the history
  • Loading branch information
ireneisdoomed committed Dec 8, 2023
1 parent 660d221 commit caaed6b
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions tests/step/test_clump_step.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""Test clump step."""
from __future__ import annotations

import tempfile
from pathlib import Path
from typing import TYPE_CHECKING

from otg.clump import ClumpStep
Expand All @@ -12,13 +14,13 @@
class TestClumpStep:
"""Test clump step."""

def test_clumpstep_summary_stats(
self: TestClumpStep,
session: Session,
) -> None:
"""Test clump step on summary statistics."""
ClumpStep(
session=session,
input_path="tests/data_samples/GCST005523_chr18.parquet",
clumped_study_locus_path="GCST005523_chr18_clumped",
)
def test_clumpstep_summary_stats(self, session: Session) -> None:
"""Test clump step on summary statistics writes results to a temporary directory."""
with tempfile.TemporaryDirectory() as temp_dir:
clumped_study_locus_path = Path(temp_dir, "GCST005523_chr18_clumped")
ClumpStep(
session=session,
input_path="tests/data_samples/GCST005523_chr18.parquet",
clumped_study_locus_path=str(clumped_study_locus_path),
)
assert Path(clumped_study_locus_path).exists(), "Output directory exists."

0 comments on commit caaed6b

Please sign in to comment.