Commit 52291019 authored by Nicolas  MAILLET's avatar Nicolas MAILLET
Browse files

Correct bug when several rules apply at same time

parent 0f5fa6f7
...@@ -411,7 +411,7 @@ def test_handle_rule(): ...@@ -411,7 +411,7 @@ def test_handle_rule():
all_rules = rule.create_rules(a_rule) all_rules = rule.create_rules(a_rule)
seq = "ABCDEF" seq = "ABCDEF"
pos = 4 pos = 4
cut = False # Not needed here cut = None # Not needed here
res = rule.handle_rule(seq, pos, all_rules[0], cut) res = rule.handle_rule(seq, pos, all_rules[0], cut)
assert res is True assert res is True
# We cut after E preceeded by D # We cut after E preceeded by D
...@@ -421,9 +421,9 @@ def test_handle_rule(): ...@@ -421,9 +421,9 @@ def test_handle_rule():
all_rules = rule.create_rules(a_rule) all_rules = rule.create_rules(a_rule)
seq = "ABCXEF" seq = "ABCXEF"
pos = 4 pos = 4
cut = False # Not needed here cut = None # Not needed here
res = rule.handle_rule(seq, pos, all_rules[0], cut) res = rule.handle_rule(seq, pos, all_rules[0], cut)
assert res is False assert res is None
# We cut after E preceeded by D # We cut after E preceeded by D
a_rule = {} a_rule = {}
rule_txt = "(D)(E,)" rule_txt = "(D)(E,)"
...@@ -431,9 +431,9 @@ def test_handle_rule(): ...@@ -431,9 +431,9 @@ def test_handle_rule():
all_rules = rule.create_rules(a_rule) all_rules = rule.create_rules(a_rule)
seq = "ABCDEF" seq = "ABCDEF"
pos = 3 # Not E pos = 3 # Not E
cut = False # Not needed here cut = None # Not needed here
res = rule.handle_rule(seq, pos, all_rules[0], cut) res = rule.handle_rule(seq, pos, all_rules[0], cut)
assert res is False assert res is None
# We cut after E NOT preceeded by D # We cut after E NOT preceeded by D
a_rule = {} a_rule = {}
...@@ -444,7 +444,7 @@ def test_handle_rule(): ...@@ -444,7 +444,7 @@ def test_handle_rule():
all_rules = rule.create_rules(a_rule) all_rules = rule.create_rules(a_rule)
seq = "ABCXEF" seq = "ABCXEF"
pos = 4 pos = 4
cut = False # Not needed here cut = None # Not needed here
res = rule.handle_rule(seq, pos, all_rules[0], cut) res = rule.handle_rule(seq, pos, all_rules[0], cut)
assert res is True assert res is True
...@@ -457,6 +457,6 @@ def test_handle_rule(): ...@@ -457,6 +457,6 @@ def test_handle_rule():
all_rules = rule.create_rules(a_rule) all_rules = rule.create_rules(a_rule)
seq = "ABCDEF" seq = "ABCDEF"
pos = 4 pos = 4
cut = False # Not needed here cut = None # Not needed here
res = rule.handle_rule(seq, pos, all_rules[0], cut) res = rule.handle_rule(seq, pos, all_rules[0], cut)
assert res is False assert res is False
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment