MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / testSpectrumIdentification

Function testSpectrumIdentification

src/pyOpenMS/tests/unittests/test000.py:512–533  ·  view source on GitHub ↗

@tests: SpectrumIdentification SpectrumIdentification.__init__

()

Source from the content-addressed store, hash-verified

510
511@report
512def testSpectrumIdentification():
513 """
514 @tests: SpectrumIdentification
515 SpectrumIdentification.__init__
516 """
517 f = pyopenms.SpectrumIdentification()
518 _testMetaInfoInterface(f)
519
520 assert pyopenms.SpectrumIdentification().setHits is not None
521 assert pyopenms.SpectrumIdentification().addHit is not None
522 assert pyopenms.SpectrumIdentification().getHits is not None
523
524 hit = pyopenms.IdentificationHit()
525 hit.setName("test1")
526 f.addHit(hit)
527 hit = pyopenms.IdentificationHit()
528 hit.setName("test2")
529 f.addHit(hit)
530 all_hits = f.getHits()
531 assert len(all_hits) == 2
532 assert "test1" in [h.getName() for h in all_hits]
533 assert "test2" in [h.getName() for h in all_hits]
534
535@report
536def testIdentification():

Callers

nothing calls this directly

Calls 5

setNameMethod · 0.95
addHitMethod · 0.95
_testMetaInfoInterfaceFunction · 0.85
IdentificationHitMethod · 0.80
getNameMethod · 0.45

Tested by

no test coverage detected