Skip to content

Commit

Permalink
Remove nose imports
Browse files Browse the repository at this point in the history
  • Loading branch information
emilazy committed Oct 27, 2024
1 parent c4d91e1 commit 8bc4dd3
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 16 deletions.
1 change: 0 additions & 1 deletion test/test_amino_acid.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
initialize()

from mhcflurry import amino_acid
from nose.tools import eq_
from numpy.testing import assert_equal
import pandas

Expand Down
7 changes: 3 additions & 4 deletions test/test_class1_affinity_predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

from mhcflurry import Class1AffinityPredictor

from nose.tools import eq_, assert_raises
from numpy import testing

from mhcflurry.downloads import get_path
Expand Down Expand Up @@ -188,13 +187,13 @@ def test_class1_affinity_predictor_a0205_memorize_training_data():
ic50_pred = predictor.predict(df.peptide.values, allele="HLA-A*02:01", throw=False)
assert numpy.isnan(ic50_pred).all()

assert_raises(
testing.assert_raises(
ValueError, predictor.predict, df.peptide.values, allele="HLA-A*02:01"
)

assert predictor.supported_alleles == [allele]
assert_raises(ValueError, predictor.predict, ["AAAAA"], allele=allele) # too short
assert_raises(
testing.assert_raises(ValueError, predictor.predict, ["AAAAA"], allele=allele) # too short
testing.assert_raises(
ValueError,
predictor.predict,
["AAAAAAAAAAAAAAAAAAAA"], # too long
Expand Down
2 changes: 0 additions & 2 deletions test/test_class1_neural_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

import pytest

from nose.tools import eq_, assert_less, assert_greater, assert_almost_equal

import pandas

from mhcflurry.class1_neural_network import Class1NeuralNetwork
Expand Down
1 change: 0 additions & 1 deletion test/test_class1_presentation_predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import pickle

from numpy.testing import assert_, assert_equal, assert_allclose, assert_array_equal
from nose.tools import assert_greater, assert_less
import pytest
import numpy

Expand Down
2 changes: 0 additions & 2 deletions test/test_class1_processing_neural_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

from sklearn.metrics import roc_auc_score

from nose.tools import eq_, assert_less, assert_greater, assert_almost_equal

import pandas
import pytest

Expand Down
2 changes: 0 additions & 2 deletions test/test_custom_loss.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from . import initialize
initialize()

from nose.tools import eq_, assert_less, assert_greater, assert_almost_equal

import numpy
import tensorflow as tf
import pytest
Expand Down
1 change: 0 additions & 1 deletion test/test_random_negative_peptides.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
initialize()

from mhcflurry import amino_acid
from nose.tools import eq_
from numpy.testing import assert_equal
import numpy
import pandas
Expand Down
1 change: 0 additions & 1 deletion test/test_regression_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from_ic50,
to_ic50,
)
from nose.tools import eq_


def test_regression_target_to_ic50():
Expand Down
1 change: 0 additions & 1 deletion test/test_released_predictors_on_hpv_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import pandas
import pytest
from sklearn.metrics import roc_auc_score
from nose.tools import assert_greater

from mhcflurry import Class1AffinityPredictor
from mhcflurry.downloads import get_path
Expand Down
1 change: 0 additions & 1 deletion test/test_released_predictors_well_correlated.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import argparse
import pandas
import numpy
from nose.tools import assert_greater

from mhcflurry import Class1AffinityPredictor
from mhcflurry.encodable_sequences import EncodableSequences
Expand Down

0 comments on commit 8bc4dd3

Please sign in to comment.