From 1260ffd40c90b069c9144620fce9c423b022b10e Mon Sep 17 00:00:00 2001 From: Angelos Kolaitis Date: Tue, 7 May 2024 15:40:02 +0300 Subject: [PATCH] add unit test for ihfold v3 parse --- tests/unit/test_foreign.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/unit/test_foreign.py b/tests/unit/test_foreign.py index 8abe96e..e235b2c 100644 --- a/tests/unit/test_foreign.py +++ b/tests/unit/test_foreign.py @@ -100,6 +100,29 @@ def test_ihfoldv2_parse(stdout, result): assert ihfold.parse_output(stdout, ihfold.PATTERN_V2) == result +IHFOLDV3_OUTPUT = """ +GGCACGAUCGGGCUCGCUGCCUUUUCGUCCGAGAGCUCGAA +[[[[...((((((((..]]]]...........)))))))). (-10.15) +""" + + +@pytest.mark.parametrize( + "stdout, result", + [ + ( + IHFOLDV3_OUTPUT, + { + "dot_bracket": "[[[[...((((((((..]]]]...........)))))))).", + "stems": 24, + "energy": -10.15, + }, + ), + ], +) +def test_ihfoldv3_parse(stdout, result): + assert ihfold.parse_output(stdout, ihfold.PATTERN_V3) == result + + HOTKNOTS_OUTPUT = ( "Total number of RNA structures: 1\nSeq: AUGAAAG\nS0: .([.)].\t-3.2\n" )