diff --git a/corpus/python/bin-op-lte/589ecba3d8a1.mutation.json b/corpus/python/bin-op-lte/589ecba3d8a1.mutation.json new file mode 100644 index 00000000..9faddf52 --- /dev/null +++ b/corpus/python/bin-op-lte/589ecba3d8a1.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "BinaryOp": "Lte" + }, + "subst_span": { + "start": { + "line": 2, + "col": 6, + "byte": 18 + }, + "end": { + "line": 2, + "col": 8, + "byte": 20 + } + }, + "effect_span": { + "start": { + "line": 2, + "col": 4, + "byte": 16 + }, + "end": { + "line": 2, + "col": 10, + "byte": 22 + } + } + }, + "subst": ">" +} \ No newline at end of file diff --git a/corpus/python/bin-op-lte/589ecba3d8a1.py b/corpus/python/bin-op-lte/589ecba3d8a1.py new file mode 100644 index 00000000..b790e82b --- /dev/null +++ b/corpus/python/bin-op-lte/589ecba3d8a1.py @@ -0,0 +1,3 @@ +a = 1 +b = 2 +x = a > b diff --git a/corpus/python/bin-op-lte/fd93e47b73f1.mutation.json b/corpus/python/bin-op-lte/fd93e47b73f1.mutation.json new file mode 100644 index 00000000..1d81b621 --- /dev/null +++ b/corpus/python/bin-op-lte/fd93e47b73f1.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "BinaryOp": "Lte" + }, + "subst_span": { + "start": { + "line": 2, + "col": 6, + "byte": 18 + }, + "end": { + "line": 2, + "col": 8, + "byte": 20 + } + }, + "effect_span": { + "start": { + "line": 2, + "col": 4, + "byte": 16 + }, + "end": { + "line": 2, + "col": 10, + "byte": 22 + } + } + }, + "subst": "<" +} \ No newline at end of file diff --git a/corpus/python/bin-op-lte/fd93e47b73f1.py b/corpus/python/bin-op-lte/fd93e47b73f1.py new file mode 100644 index 00000000..9b67b98e --- /dev/null +++ b/corpus/python/bin-op-lte/fd93e47b73f1.py @@ -0,0 +1,3 @@ +a = 1 +b = 2 +x = a < b diff --git a/crates/bough-core/src/language/python.rs b/crates/bough-core/src/language/python.rs index 49b2857f..544fbe57 100644 --- a/crates/bough-core/src/language/python.rs +++ b/crates/bough-core/src/language/python.rs @@ -42,6 +42,7 @@ impl LanguageDriver for PythonDriver { ">" => BinaryOpMutationKind::Gt, ">=" => BinaryOpMutationKind::Gte, "<" => BinaryOpMutationKind::Lt, + "<=" => BinaryOpMutationKind::Lte, _ => return None, }; Some((MutantKind::BinaryOp(kind), span_from_node(&op_node), span_from_node(node))) @@ -83,6 +84,7 @@ impl LanguageDriver for PythonDriver { MutantKind::BinaryOp(BinaryOpMutationKind::Gt) => vec!["<=".into(), ">=".into()], MutantKind::BinaryOp(BinaryOpMutationKind::Gte) => vec!["<".into(), ">".into()], MutantKind::BinaryOp(BinaryOpMutationKind::Lt) => vec![">=".into(), "<=".into()], + MutantKind::BinaryOp(BinaryOpMutationKind::Lte) => vec![">".into(), "<".into()], _ => vec![], } }