@tests: SpectrumIdentification SpectrumIdentification.__init__
()
| 510 | |
| 511 | @report |
| 512 | def 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 |
| 536 | def testIdentification(): |
nothing calls this directly
no test coverage detected