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

Function testIdentificationHit

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

@tests: IdentificationHit IdentificationHit.__init__

()

Source from the content-addressed store, hash-verified

462
463@report
464def testIdentificationHit():
465 """
466 @tests: IdentificationHit
467 IdentificationHit.__init__
468 """
469 f = pyopenms.IdentificationHit()
470 _testMetaInfoInterface(f)
471
472 assert pyopenms.IdentificationHit().setId is not None
473 assert pyopenms.IdentificationHit().getId is not None
474 assert pyopenms.IdentificationHit().setCharge is not None
475 assert pyopenms.IdentificationHit().getCharge is not None
476 assert pyopenms.IdentificationHit().setCalculatedMassToCharge is not None
477 assert pyopenms.IdentificationHit().getCalculatedMassToCharge is not None
478 assert pyopenms.IdentificationHit().setExperimentalMassToCharge is not None
479 assert pyopenms.IdentificationHit().getExperimentalMassToCharge is not None
480 assert pyopenms.IdentificationHit().setName is not None
481 assert pyopenms.IdentificationHit().getName is not None
482 assert pyopenms.IdentificationHit().setPassThreshold is not None
483 assert pyopenms.IdentificationHit().getPassThreshold is not None
484 assert pyopenms.IdentificationHit().setRank is not None
485 assert pyopenms.IdentificationHit().getRank is not None
486
487 f.setId("test_id")
488 assert f.getId() == "test_id"
489
490 f.setId("test_id")
491 assert f.getId() == "test_id"
492
493 f.setCharge(5)
494 assert f.getCharge() == 5
495
496 f.setCalculatedMassToCharge(5.0)
497 assert f.getCalculatedMassToCharge() == 5.0
498
499 f.setExperimentalMassToCharge(5.0)
500 assert f.getExperimentalMassToCharge() == 5.0
501
502 f.setName("test")
503 assert f.getName() == "test"
504
505 f.setPassThreshold(True)
506 assert f.getPassThreshold() == True
507
508 f.setRank(42)
509 assert f.getRank() == 42
510
511@report
512def testSpectrumIdentification():

Callers

nothing calls this directly

Calls 15

setIdMethod · 0.95
setChargeMethod · 0.95
getChargeMethod · 0.95
setNameMethod · 0.95
setPassThresholdMethod · 0.95
getPassThresholdMethod · 0.95
setRankMethod · 0.95
getRankMethod · 0.95

Tested by

no test coverage detected