Commit 1a31f870 by Nicolas MAILLET

### Add test for the specific bug, i.e. defining a new enzyme with at least 3 aa...

`Add test for the specific bug, i.e. defining a new enzyme with at least 3 aa and cleaving site on the first one`
parent 2548da8f
 ... ... @@ -35,7 +35,7 @@ def test_rule(): # Test function '__eq__()' assert rule0 == rule2 # Complexe rule2 # complex rule2 rule2.rules.append(rule1) # Test __repr__ ... ... @@ -329,7 +329,7 @@ def test_create_rules(): assert truth2_2 in res assert len(res) == 3 # Other complexe rule # Other complex rule # Don't cleaves after E if there is a D before # But cleaves after E otherwise rule3 = "(E,)" ... ... @@ -347,7 +347,7 @@ def test_create_rules(): assert truth3 in res assert len(res) == 4 # Similar complexe rule # Similar complex rule # Cleaves after G if there is a F before # But don't cleaves after G otherwise rule4 = "(F)(G,)" ... ... @@ -403,7 +403,7 @@ def test_create_rules(): assert truth6_4 in res assert len(res) == 4 # Similar complexe rule # Similar complex rule # Cleaves before G if there is a H after # But don't cleaves before G otherwise all_rules = {} ... ... @@ -417,6 +417,22 @@ def test_create_rules(): assert truth7 in res assert len(res) == 1 # Similar complex rule # Cleaves before E if there is a E after and another E after # But don't cleaves before E otherwise all_rules = {} rule8 = "(,E)(E)(E)" all_rules[rule8] = True # Truth for rule8 truth8_2 = rule.Rule(2, "E", True, -1) truth8_1 = rule.Rule(1, "E", False, -1) truth8 = rule.Rule(0, "E", False, 0) # Don't cleaves after E truth8_1.rules.append(truth8_2) truth8.rules.append(truth8_1) res = rule.create_rules(all_rules) assert truth8 in res assert len(res) == 1 def test_handle_rule(): """Test function 'handle_rule(seq, pos, a_rule, cleavage)'""" ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!