Skip to content

Commit

Permalink
got rid of yield in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iskandr committed Mar 13, 2024
1 parent 65a0205 commit e829942
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
echo `which netMHCcons` && netMHCcons -h
echo `which netMHCstab` && netMHCstab -h
echo `which netMHCstabpan` && netMHCstabpan -h
./test.sh
- name: Publish coverage to Coveralls
uses: coverallsapp/[email protected]
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
'Topic :: Scientific/Engineering :: Bio-Informatics',
],
install_requires=[
'numpy>=1.7',
'numpy>=1.7,<2.0',
'pandas>=0.13.1',
'varcode>=0.5.9',
'pyensembl>=1.0.3',
Expand Down
4 changes: 2 additions & 2 deletions tests/test_known_class1_epitopes.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ def test_MAGE_epitope():
# T Cells
for mhc_class in mhc_classes:
mhc_model = make_mhc_model(mhc_class, "HLA-A*01:01")
yield (expect_binder, mhc_model, "ESDPIVAQY")
expect_binder(mhc_model, "ESDPIVAQY")

def test_HIV_epitope():
# Test the A2 HIV epitope SLYNTVATL from
# The HIV-1 HLA-A2-SLYNTVATL Is a Help-Independent CTL Epitope
for mhc_class in mhc_classes:
mhc_model = make_mhc_model(mhc_class, "HLA-A*02:01")
yield (expect_binder, mhc_model, "SLYNTVATL")
expect_binder(mhc_model, "SLYNTVATL")
4 changes: 2 additions & 2 deletions tests/test_netmhc_pan.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@


def test_netmhc_pan():
yield check_netmhc_pan, "netMHCpan", True # required
check_netmhc_pan("netMHCpan", True) # required

for program_name in OPTIONAL_NETMHCPAN_PROGRAM_NAMES:
yield check_netmhc_pan, program_name, False # optional
check_netmhc_pan(program_name, False) # optional


def check_netmhc_pan(program_name, fail_if_no_such_program=True):
Expand Down
3 changes: 1 addition & 2 deletions tests/test_netmhc_stabpan.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
def test_netmhc_stabpan_accuracy():
# Check that the netMHCstabpan program is working and returning th eexpected outputs.
predictor = NetMHCstabpan(
alleles=[DEFAULT_ALLELE], program_name='netMHCstabpan'
)
alleles=[DEFAULT_ALLELE], program_name='netMHCstabpan')

binding_predictions = predictor.predict_peptides(protein_sequences)
stability_predictions = [p.score for p in binding_predictions]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_netmhcii_pan.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ def test_netmhcii_pan_mouse():

# follows similar model to test_netmhc_pan.py
def test_netmhcii_pan():
yield check_netmhcii_pan, "netMHCIIpan", True # required
check_netmhcii_pan("netMHCIIpan", True) # required

for program_name in OPTIONAL_NETMHCIIPAN_PROGRAM_NAMES:
yield check_netmhcii_pan, program_name, False # optional
check_netmhcii_pan(program_name, False) # optional

# TODO: add more actual tests to this
def check_netmhcii_pan(program_name, fail_if_no_such_program=True):
Expand Down

0 comments on commit e829942

Please sign in to comment.