Skip to content

Commit

Permalink
updated tests which won't work in GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
RSWilson1 committed Feb 1, 2024
1 parent f91975e commit 8fb63c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/test_construct_vcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), 'test_data')

IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true"

class TestConstructVCF(unittest.TestCase):
def setUp(self):
Expand Down Expand Up @@ -185,6 +186,7 @@ def test_fetch_nucleotides_invalid_chr_number(self):
with pytest.raises(ValueError, match=expected_error):
result_df = vcf_obj.fetch_nucleotides(row, self.reference_path)

@pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test doesn't work in Github Actions.")
def test_convert_bed_to_vcf(self):
"""
Tests if the convert_bed_to_vcf method returns the expected output
Expand All @@ -210,9 +212,7 @@ def test_convert_bed_to_vcf(self):

# Convert the data types of the specified columns
expected_df = expected_df.astype(columns_to_convert)
print("compare dfs")
print(vcf_df)
print(expected_df)

pd.testing.assert_frame_equal(expected_df, vcf_df)


Expand Down
4 changes: 1 addition & 3 deletions tests/test_gene_annotation2bed.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
os.path.join(os.path.dirname(__file__), 'test_data')
)

IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true"

class TestParseGFF(unittest.TestCase):
"""
Tests for parsing the gff file.
Expand Down Expand Up @@ -294,7 +292,7 @@ def setUp(self):
def capsys(self, capsys):
self.capsys = capsys

def test_parsing_prints2(self):
def test_parsing_prints(self):
"""
Test parsing of transcripts from the annotation file.
- Checks prints for correct output.
Expand Down

0 comments on commit 8fb63c2

Please sign in to comment.