Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

Commit

Permalink
use session scopes for fixtures in conftest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nebfield committed Sep 12, 2022
1 parent 1a4a14e commit 1a1529b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def hg19_coords(hg38_coords):
return pd.DataFrame(d)


@pytest.fixture
@pytest.fixture(scope='session')
def small_flipped_scorefile(small_scorefile):
# simulate a scorefile on the wrong strand
return (complement_valid_alleles(small_scorefile, ['effect_allele', 'other_allele'])
Expand All @@ -152,7 +152,7 @@ def small_flipped_scorefile(small_scorefile):
.pipe(complement_valid_alleles, ['effect_allele', 'other_allele']))


@pytest.fixture
@pytest.fixture(scope='session')
def small_target():
return pl.DataFrame({"#CHROM": [1, 2, 3],
"POS": [1, 2, 3],
Expand All @@ -162,7 +162,7 @@ def small_target():
"is_multiallelic": [False, False, False]})


@pytest.fixture
@pytest.fixture(scope='session')
def small_scorefile():
df = pl.DataFrame({"accession": ["test", "test", "test"],
"row_nr": [1, 2, 3],
Expand All @@ -176,7 +176,7 @@ def small_scorefile():
return complement_valid_alleles(df, ["effect_allele", "other_allele"])


@pytest.fixture
@pytest.fixture(scope='session')
def small_scorefile_no_oa(small_scorefile):
return small_scorefile.with_column(pl.lit(None).alias('other_allele'))

Expand Down

0 comments on commit 1a1529b

Please sign in to comment.