-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge: pull request #6 from brsynth/GetCids
chore(rp2erxn): handle different cmp IDs
- Loading branch information
Showing
3 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""" | ||
Created on Oct 16 2023 | ||
@author: Joan Hérisson | ||
""" | ||
|
||
from unittest import TestCase | ||
|
||
from os import stat as os_stat | ||
from os import path as os_path | ||
|
||
from rp2paths.rp2erxn import Compound | ||
|
||
|
||
class Test_rp2erxn(TestCase): | ||
|
||
def test_SortCidsMNXM_1(self): | ||
mnx_cids = ['MNXM03', 'MNXM02', 'MNXM5', 'MNXM1'] | ||
self.assertListEqual( | ||
Compound.SortCids(mnx_cids), | ||
['MNXM1', 'MNXM02', 'MNXM03', 'MNXM5'] | ||
) | ||
|
||
def test_SortCidsMNXM_2(self): | ||
mnx_cids = ['MNXM03', 'MNXM02', 'MNXM5__64__MNXC3', 'MNXM1'] | ||
self.assertListEqual( | ||
Compound.SortCids(mnx_cids), | ||
['MNXM1', 'MNXM02', 'MNXM03', 'MNXM5__64__MNXC3'] | ||
) | ||
|
||
def test_SortCidsNotMNXM(self): | ||
mnx_cids = ['M_2agpg181_c', 'M_2agpg161_c', 'M_2ahbut_c', 'M_2agpg180_c', 'MNXM1'] | ||
self.assertListEqual( | ||
Compound.SortCids(mnx_cids), | ||
['MNXM1', 'M_2agpg161_c', 'M_2agpg180_c', 'M_2agpg181_c', 'M_2ahbut_c'] | ||
) |