Skip to content

Commit

Permalink
Remove test dependency on NumPy. Use explicit sets for Py2
Browse files Browse the repository at this point in the history
  • Loading branch information
mobiusklein committed Oct 6, 2020
1 parent 1b776a6 commit 743e9d4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/test_usi.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from itertools import product
import operator as op

import numpy as np

from pyteomics.usi import USI, proxi


Expand All @@ -30,9 +28,13 @@ def test_request(self):
usi_str = "mzspec:MSV000085202:210320_SARS_CoV_2_T:scan:131256"
response = proxi(usi_str, backend='peptide_atlas')

assert usi_proxi_data.keys() <= response.keys()
assert np.allclose(response['m/z array'] - usi_proxi_data['m/z array'], 0)
assert np.allclose(response['intensity array'] - usi_proxi_data['intensity array'], 0)
assert set(usi_proxi_data.keys()) <= set(response.keys())

for a, b in zip(response['m/z array'], usi_proxi_data['m/z array']):
self.assertAlmostEqual(a, b, 3)

for a, b in zip(response['intensity array'], usi_proxi_data['intensity array']):
self.assertAlmostEqual(a, b, 3)



Expand Down

0 comments on commit 743e9d4

Please sign in to comment.