Skip to content

Commit

Permalink
Merge 8267f4c into 51e1c26
Browse files Browse the repository at this point in the history
  • Loading branch information
justaddcoffee authored Jul 7, 2020
2 parents 51e1c26 + 8267f4c commit cd3d988
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ before_install:
- pip install --upgrade pytest
- pip install --upgrade mypy
- pip install --upgrade pylint
- pip install orderedset
- pip install bmt
- pip install -r requirements.txt
- pip install yamllint
Expand Down
21 changes: 21 additions & 0 deletions tests/test_gpi_file.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import os
import unittest

from kg_covid_19.transform_utils.sars_cov_2_gene_annot.sars_cov_2_gene_annot import \
_gpi12iterator


class TestGpiFile(unittest.TestCase):
def setUp(self) -> None:
self.gpi_file = 'curated/ORFs/uniprot_sars-cov-2.gpi'
self.expected_sars_cov2_genes = 32

def test_gpi_file_exists(self):
self.assertTrue(os.path.exists(self.gpi_file))

def test_gpi_parsing(self):
count: int = 0
with open(self.gpi_file, 'r') as gpi_fh:
for rec in _gpi12iterator(gpi_fh):
count += 1
self.assertEqual(self.expected_sars_cov2_genes, count)

0 comments on commit cd3d988

Please sign in to comment.