From 8e5708ddc54595a7d085a4cd4e7e8ddc52a20735 Mon Sep 17 00:00:00 2001 From: Freddie Ridell Date: Thu, 19 Mar 2026 09:56:33 +0000 Subject: [PATCH] py: generator-expression --- .../0baee669742b.mutation.json | 36 +++++++++++++++++++ .../generator-expression/0baee669742b.py | 1 + .../157455b331b0.mutation.json | 36 +++++++++++++++++++ .../generator-expression/157455b331b0.py | 1 + .../19389c116321.mutation.json | 36 +++++++++++++++++++ .../generator-expression/19389c116321.py | 1 + .../34e9101bc672.mutation.json | 36 +++++++++++++++++++ .../generator-expression/34e9101bc672.py | 1 + .../4cfb26dd63ec.mutation.json | 34 ++++++++++++++++++ .../generator-expression/4cfb26dd63ec.py | 1 + .../5ee9fd643bc8.mutation.json | 36 +++++++++++++++++++ .../generator-expression/5ee9fd643bc8.py | 1 + .../660eb6c65df3.mutation.json | 36 +++++++++++++++++++ .../generator-expression/660eb6c65df3.py | 1 + .../87f77f79efaa.mutation.json | 36 +++++++++++++++++++ .../generator-expression/87f77f79efaa.py | 1 + .../9093cd51436e.mutation.json | 36 +++++++++++++++++++ .../generator-expression/9093cd51436e.py | 1 + .../93a5daa2917a.mutation.json | 36 +++++++++++++++++++ .../generator-expression/93a5daa2917a.py | 1 + .../a56bab40a871.mutation.json | 36 +++++++++++++++++++ .../generator-expression/a56bab40a871.py | 1 + .../b936f516774b.mutation.json | 36 +++++++++++++++++++ .../generator-expression/b936f516774b.py | 1 + .../b97c46f10ec6.mutation.json | 36 +++++++++++++++++++ .../generator-expression/b97c46f10ec6.py | 1 + .../c0c91f2cc816.mutation.json | 36 +++++++++++++++++++ .../generator-expression/c0c91f2cc816.py | 1 + .../d86c3a85df3f.mutation.json | 36 +++++++++++++++++++ .../generator-expression/d86c3a85df3f.py | 1 + .../de3a0db9bd02.mutation.json | 36 +++++++++++++++++++ .../generator-expression/de3a0db9bd02.py | 1 + .../e70129bc0fee.mutation.json | 36 +++++++++++++++++++ .../generator-expression/e70129bc0fee.py | 1 + .../ec05a0f02b29.mutation.json | 36 +++++++++++++++++++ .../generator-expression/ec05a0f02b29.py | 1 + .../efac99dd46c7.mutation.json | 36 +++++++++++++++++++ .../generator-expression/efac99dd46c7.py | 1 + .../f3fdeb63a1d9.mutation.json | 36 +++++++++++++++++++ .../generator-expression/f3fdeb63a1d9.py | 1 + crates/bough-core/src/language/python.rs | 4 +-- 41 files changed, 740 insertions(+), 2 deletions(-) create mode 100644 corpus/python/generator-expression/0baee669742b.mutation.json create mode 100644 corpus/python/generator-expression/0baee669742b.py create mode 100644 corpus/python/generator-expression/157455b331b0.mutation.json create mode 100644 corpus/python/generator-expression/157455b331b0.py create mode 100644 corpus/python/generator-expression/19389c116321.mutation.json create mode 100644 corpus/python/generator-expression/19389c116321.py create mode 100644 corpus/python/generator-expression/34e9101bc672.mutation.json create mode 100644 corpus/python/generator-expression/34e9101bc672.py create mode 100644 corpus/python/generator-expression/4cfb26dd63ec.mutation.json create mode 100644 corpus/python/generator-expression/4cfb26dd63ec.py create mode 100644 corpus/python/generator-expression/5ee9fd643bc8.mutation.json create mode 100644 corpus/python/generator-expression/5ee9fd643bc8.py create mode 100644 corpus/python/generator-expression/660eb6c65df3.mutation.json create mode 100644 corpus/python/generator-expression/660eb6c65df3.py create mode 100644 corpus/python/generator-expression/87f77f79efaa.mutation.json create mode 100644 corpus/python/generator-expression/87f77f79efaa.py create mode 100644 corpus/python/generator-expression/9093cd51436e.mutation.json create mode 100644 corpus/python/generator-expression/9093cd51436e.py create mode 100644 corpus/python/generator-expression/93a5daa2917a.mutation.json create mode 100644 corpus/python/generator-expression/93a5daa2917a.py create mode 100644 corpus/python/generator-expression/a56bab40a871.mutation.json create mode 100644 corpus/python/generator-expression/a56bab40a871.py create mode 100644 corpus/python/generator-expression/b936f516774b.mutation.json create mode 100644 corpus/python/generator-expression/b936f516774b.py create mode 100644 corpus/python/generator-expression/b97c46f10ec6.mutation.json create mode 100644 corpus/python/generator-expression/b97c46f10ec6.py create mode 100644 corpus/python/generator-expression/c0c91f2cc816.mutation.json create mode 100644 corpus/python/generator-expression/c0c91f2cc816.py create mode 100644 corpus/python/generator-expression/d86c3a85df3f.mutation.json create mode 100644 corpus/python/generator-expression/d86c3a85df3f.py create mode 100644 corpus/python/generator-expression/de3a0db9bd02.mutation.json create mode 100644 corpus/python/generator-expression/de3a0db9bd02.py create mode 100644 corpus/python/generator-expression/e70129bc0fee.mutation.json create mode 100644 corpus/python/generator-expression/e70129bc0fee.py create mode 100644 corpus/python/generator-expression/ec05a0f02b29.mutation.json create mode 100644 corpus/python/generator-expression/ec05a0f02b29.py create mode 100644 corpus/python/generator-expression/efac99dd46c7.mutation.json create mode 100644 corpus/python/generator-expression/efac99dd46c7.py create mode 100644 corpus/python/generator-expression/f3fdeb63a1d9.mutation.json create mode 100644 corpus/python/generator-expression/f3fdeb63a1d9.py diff --git a/corpus/python/generator-expression/0baee669742b.mutation.json b/corpus/python/generator-expression/0baee669742b.mutation.json new file mode 100644 index 00000000..00290703 --- /dev/null +++ b/corpus/python/generator-expression/0baee669742b.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 17, + "byte": 17 + }, + "end": { + "line": 0, + "col": 18, + "byte": 18 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 17, + "byte": 17 + }, + "end": { + "line": 0, + "col": 18, + "byte": 18 + } + } + }, + "subst": "1" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/0baee669742b.py b/corpus/python/generator-expression/0baee669742b.py new file mode 100644 index 00000000..7063c0b3 --- /dev/null +++ b/corpus/python/generator-expression/0baee669742b.py @@ -0,0 +1 @@ +list(x for x in [1, 2, 3]) diff --git a/corpus/python/generator-expression/157455b331b0.mutation.json b/corpus/python/generator-expression/157455b331b0.mutation.json new file mode 100644 index 00000000..5af85e19 --- /dev/null +++ b/corpus/python/generator-expression/157455b331b0.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 23, + "byte": 23 + }, + "end": { + "line": 0, + "col": 24, + "byte": 24 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 23, + "byte": 23 + }, + "end": { + "line": 0, + "col": 24, + "byte": 24 + } + } + }, + "subst": "float('-inf')" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/157455b331b0.py b/corpus/python/generator-expression/157455b331b0.py new file mode 100644 index 00000000..8ea8f907 --- /dev/null +++ b/corpus/python/generator-expression/157455b331b0.py @@ -0,0 +1 @@ +list(x for x in [1, 2, float('-inf')]) diff --git a/corpus/python/generator-expression/19389c116321.mutation.json b/corpus/python/generator-expression/19389c116321.mutation.json new file mode 100644 index 00000000..9715b159 --- /dev/null +++ b/corpus/python/generator-expression/19389c116321.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 20, + "byte": 20 + }, + "end": { + "line": 0, + "col": 21, + "byte": 21 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 20, + "byte": 20 + }, + "end": { + "line": 0, + "col": 21, + "byte": 21 + } + } + }, + "subst": "0" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/19389c116321.py b/corpus/python/generator-expression/19389c116321.py new file mode 100644 index 00000000..1d94be07 --- /dev/null +++ b/corpus/python/generator-expression/19389c116321.py @@ -0,0 +1 @@ +list(x for x in [1, 0, 3]) diff --git a/corpus/python/generator-expression/34e9101bc672.mutation.json b/corpus/python/generator-expression/34e9101bc672.mutation.json new file mode 100644 index 00000000..795527f9 --- /dev/null +++ b/corpus/python/generator-expression/34e9101bc672.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 23, + "byte": 23 + }, + "end": { + "line": 0, + "col": 24, + "byte": 24 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 23, + "byte": 23 + }, + "end": { + "line": 0, + "col": 24, + "byte": 24 + } + } + }, + "subst": "float('inf')" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/34e9101bc672.py b/corpus/python/generator-expression/34e9101bc672.py new file mode 100644 index 00000000..5b489bef --- /dev/null +++ b/corpus/python/generator-expression/34e9101bc672.py @@ -0,0 +1 @@ +list(x for x in [1, 2, float('inf')]) diff --git a/corpus/python/generator-expression/4cfb26dd63ec.mutation.json b/corpus/python/generator-expression/4cfb26dd63ec.mutation.json new file mode 100644 index 00000000..6a0735f9 --- /dev/null +++ b/corpus/python/generator-expression/4cfb26dd63ec.mutation.json @@ -0,0 +1,34 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": "TupleDecl", + "subst_span": { + "start": { + "line": 0, + "col": 4, + "byte": 4 + }, + "end": { + "line": 0, + "col": 26, + "byte": 26 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 4, + "byte": 4 + }, + "end": { + "line": 0, + "col": 26, + "byte": 26 + } + } + }, + "subst": "()" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/4cfb26dd63ec.py b/corpus/python/generator-expression/4cfb26dd63ec.py new file mode 100644 index 00000000..7916aaae --- /dev/null +++ b/corpus/python/generator-expression/4cfb26dd63ec.py @@ -0,0 +1 @@ +list() diff --git a/corpus/python/generator-expression/5ee9fd643bc8.mutation.json b/corpus/python/generator-expression/5ee9fd643bc8.mutation.json new file mode 100644 index 00000000..52b3b70a --- /dev/null +++ b/corpus/python/generator-expression/5ee9fd643bc8.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 17, + "byte": 17 + }, + "end": { + "line": 0, + "col": 18, + "byte": 18 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 17, + "byte": 17 + }, + "end": { + "line": 0, + "col": 18, + "byte": 18 + } + } + }, + "subst": "float('nan')" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/5ee9fd643bc8.py b/corpus/python/generator-expression/5ee9fd643bc8.py new file mode 100644 index 00000000..1e02871b --- /dev/null +++ b/corpus/python/generator-expression/5ee9fd643bc8.py @@ -0,0 +1 @@ +list(x for x in [float('nan'), 2, 3]) diff --git a/corpus/python/generator-expression/660eb6c65df3.mutation.json b/corpus/python/generator-expression/660eb6c65df3.mutation.json new file mode 100644 index 00000000..2efd796e --- /dev/null +++ b/corpus/python/generator-expression/660eb6c65df3.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 20, + "byte": 20 + }, + "end": { + "line": 0, + "col": 21, + "byte": 21 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 20, + "byte": 20 + }, + "end": { + "line": 0, + "col": 21, + "byte": 21 + } + } + }, + "subst": "float('nan')" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/660eb6c65df3.py b/corpus/python/generator-expression/660eb6c65df3.py new file mode 100644 index 00000000..3c7a6c7f --- /dev/null +++ b/corpus/python/generator-expression/660eb6c65df3.py @@ -0,0 +1 @@ +list(x for x in [1, float('nan'), 3]) diff --git a/corpus/python/generator-expression/87f77f79efaa.mutation.json b/corpus/python/generator-expression/87f77f79efaa.mutation.json new file mode 100644 index 00000000..58ca7a07 --- /dev/null +++ b/corpus/python/generator-expression/87f77f79efaa.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 17, + "byte": 17 + }, + "end": { + "line": 0, + "col": 18, + "byte": 18 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 17, + "byte": 17 + }, + "end": { + "line": 0, + "col": 18, + "byte": 18 + } + } + }, + "subst": "-1" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/87f77f79efaa.py b/corpus/python/generator-expression/87f77f79efaa.py new file mode 100644 index 00000000..b82b029d --- /dev/null +++ b/corpus/python/generator-expression/87f77f79efaa.py @@ -0,0 +1 @@ +list(x for x in [-1, 2, 3]) diff --git a/corpus/python/generator-expression/9093cd51436e.mutation.json b/corpus/python/generator-expression/9093cd51436e.mutation.json new file mode 100644 index 00000000..ded17140 --- /dev/null +++ b/corpus/python/generator-expression/9093cd51436e.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 23, + "byte": 23 + }, + "end": { + "line": 0, + "col": 24, + "byte": 24 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 23, + "byte": 23 + }, + "end": { + "line": 0, + "col": 24, + "byte": 24 + } + } + }, + "subst": "1" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/9093cd51436e.py b/corpus/python/generator-expression/9093cd51436e.py new file mode 100644 index 00000000..5b189521 --- /dev/null +++ b/corpus/python/generator-expression/9093cd51436e.py @@ -0,0 +1 @@ +list(x for x in [1, 2, 1]) diff --git a/corpus/python/generator-expression/93a5daa2917a.mutation.json b/corpus/python/generator-expression/93a5daa2917a.mutation.json new file mode 100644 index 00000000..ad49de22 --- /dev/null +++ b/corpus/python/generator-expression/93a5daa2917a.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 20, + "byte": 20 + }, + "end": { + "line": 0, + "col": 21, + "byte": 21 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 20, + "byte": 20 + }, + "end": { + "line": 0, + "col": 21, + "byte": 21 + } + } + }, + "subst": "-1" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/93a5daa2917a.py b/corpus/python/generator-expression/93a5daa2917a.py new file mode 100644 index 00000000..40069098 --- /dev/null +++ b/corpus/python/generator-expression/93a5daa2917a.py @@ -0,0 +1 @@ +list(x for x in [1, -1, 3]) diff --git a/corpus/python/generator-expression/a56bab40a871.mutation.json b/corpus/python/generator-expression/a56bab40a871.mutation.json new file mode 100644 index 00000000..ecf202a4 --- /dev/null +++ b/corpus/python/generator-expression/a56bab40a871.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 23, + "byte": 23 + }, + "end": { + "line": 0, + "col": 24, + "byte": 24 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 23, + "byte": 23 + }, + "end": { + "line": 0, + "col": 24, + "byte": 24 + } + } + }, + "subst": "float('nan')" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/a56bab40a871.py b/corpus/python/generator-expression/a56bab40a871.py new file mode 100644 index 00000000..286f8a9e --- /dev/null +++ b/corpus/python/generator-expression/a56bab40a871.py @@ -0,0 +1 @@ +list(x for x in [1, 2, float('nan')]) diff --git a/corpus/python/generator-expression/b936f516774b.mutation.json b/corpus/python/generator-expression/b936f516774b.mutation.json new file mode 100644 index 00000000..4dc6fb50 --- /dev/null +++ b/corpus/python/generator-expression/b936f516774b.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 17, + "byte": 17 + }, + "end": { + "line": 0, + "col": 18, + "byte": 18 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 17, + "byte": 17 + }, + "end": { + "line": 0, + "col": 18, + "byte": 18 + } + } + }, + "subst": "0" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/b936f516774b.py b/corpus/python/generator-expression/b936f516774b.py new file mode 100644 index 00000000..d4399117 --- /dev/null +++ b/corpus/python/generator-expression/b936f516774b.py @@ -0,0 +1 @@ +list(x for x in [0, 2, 3]) diff --git a/corpus/python/generator-expression/b97c46f10ec6.mutation.json b/corpus/python/generator-expression/b97c46f10ec6.mutation.json new file mode 100644 index 00000000..877b3f1a --- /dev/null +++ b/corpus/python/generator-expression/b97c46f10ec6.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 20, + "byte": 20 + }, + "end": { + "line": 0, + "col": 21, + "byte": 21 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 20, + "byte": 20 + }, + "end": { + "line": 0, + "col": 21, + "byte": 21 + } + } + }, + "subst": "float('inf')" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/b97c46f10ec6.py b/corpus/python/generator-expression/b97c46f10ec6.py new file mode 100644 index 00000000..c5c0e430 --- /dev/null +++ b/corpus/python/generator-expression/b97c46f10ec6.py @@ -0,0 +1 @@ +list(x for x in [1, float('inf'), 3]) diff --git a/corpus/python/generator-expression/c0c91f2cc816.mutation.json b/corpus/python/generator-expression/c0c91f2cc816.mutation.json new file mode 100644 index 00000000..cf49c82c --- /dev/null +++ b/corpus/python/generator-expression/c0c91f2cc816.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 20, + "byte": 20 + }, + "end": { + "line": 0, + "col": 21, + "byte": 21 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 20, + "byte": 20 + }, + "end": { + "line": 0, + "col": 21, + "byte": 21 + } + } + }, + "subst": "float('-inf')" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/c0c91f2cc816.py b/corpus/python/generator-expression/c0c91f2cc816.py new file mode 100644 index 00000000..540abdf3 --- /dev/null +++ b/corpus/python/generator-expression/c0c91f2cc816.py @@ -0,0 +1 @@ +list(x for x in [1, float('-inf'), 3]) diff --git a/corpus/python/generator-expression/d86c3a85df3f.mutation.json b/corpus/python/generator-expression/d86c3a85df3f.mutation.json new file mode 100644 index 00000000..a1adeb02 --- /dev/null +++ b/corpus/python/generator-expression/d86c3a85df3f.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "ArrayDecl": "Inline" + }, + "subst_span": { + "start": { + "line": 0, + "col": 16, + "byte": 16 + }, + "end": { + "line": 0, + "col": 25, + "byte": 25 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 16, + "byte": 16 + }, + "end": { + "line": 0, + "col": 25, + "byte": 25 + } + } + }, + "subst": "[]" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/d86c3a85df3f.py b/corpus/python/generator-expression/d86c3a85df3f.py new file mode 100644 index 00000000..87740a77 --- /dev/null +++ b/corpus/python/generator-expression/d86c3a85df3f.py @@ -0,0 +1 @@ +list(x for x in []) diff --git a/corpus/python/generator-expression/de3a0db9bd02.mutation.json b/corpus/python/generator-expression/de3a0db9bd02.mutation.json new file mode 100644 index 00000000..50aca31a --- /dev/null +++ b/corpus/python/generator-expression/de3a0db9bd02.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 17, + "byte": 17 + }, + "end": { + "line": 0, + "col": 18, + "byte": 18 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 17, + "byte": 17 + }, + "end": { + "line": 0, + "col": 18, + "byte": 18 + } + } + }, + "subst": "float('inf')" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/de3a0db9bd02.py b/corpus/python/generator-expression/de3a0db9bd02.py new file mode 100644 index 00000000..41aa5747 --- /dev/null +++ b/corpus/python/generator-expression/de3a0db9bd02.py @@ -0,0 +1 @@ +list(x for x in [float('inf'), 2, 3]) diff --git a/corpus/python/generator-expression/e70129bc0fee.mutation.json b/corpus/python/generator-expression/e70129bc0fee.mutation.json new file mode 100644 index 00000000..e5ee731a --- /dev/null +++ b/corpus/python/generator-expression/e70129bc0fee.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 23, + "byte": 23 + }, + "end": { + "line": 0, + "col": 24, + "byte": 24 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 23, + "byte": 23 + }, + "end": { + "line": 0, + "col": 24, + "byte": 24 + } + } + }, + "subst": "0" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/e70129bc0fee.py b/corpus/python/generator-expression/e70129bc0fee.py new file mode 100644 index 00000000..a3b73f54 --- /dev/null +++ b/corpus/python/generator-expression/e70129bc0fee.py @@ -0,0 +1 @@ +list(x for x in [1, 2, 0]) diff --git a/corpus/python/generator-expression/ec05a0f02b29.mutation.json b/corpus/python/generator-expression/ec05a0f02b29.mutation.json new file mode 100644 index 00000000..49466187 --- /dev/null +++ b/corpus/python/generator-expression/ec05a0f02b29.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 23, + "byte": 23 + }, + "end": { + "line": 0, + "col": 24, + "byte": 24 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 23, + "byte": 23 + }, + "end": { + "line": 0, + "col": 24, + "byte": 24 + } + } + }, + "subst": "-1" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/ec05a0f02b29.py b/corpus/python/generator-expression/ec05a0f02b29.py new file mode 100644 index 00000000..9d39ca44 --- /dev/null +++ b/corpus/python/generator-expression/ec05a0f02b29.py @@ -0,0 +1 @@ +list(x for x in [1, 2, -1]) diff --git a/corpus/python/generator-expression/efac99dd46c7.mutation.json b/corpus/python/generator-expression/efac99dd46c7.mutation.json new file mode 100644 index 00000000..7fc34dd2 --- /dev/null +++ b/corpus/python/generator-expression/efac99dd46c7.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 17, + "byte": 17 + }, + "end": { + "line": 0, + "col": 18, + "byte": 18 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 17, + "byte": 17 + }, + "end": { + "line": 0, + "col": 18, + "byte": 18 + } + } + }, + "subst": "float('-inf')" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/efac99dd46c7.py b/corpus/python/generator-expression/efac99dd46c7.py new file mode 100644 index 00000000..ffe4151d --- /dev/null +++ b/corpus/python/generator-expression/efac99dd46c7.py @@ -0,0 +1 @@ +list(x for x in [float('-inf'), 2, 3]) diff --git a/corpus/python/generator-expression/f3fdeb63a1d9.mutation.json b/corpus/python/generator-expression/f3fdeb63a1d9.mutation.json new file mode 100644 index 00000000..0c3ea273 --- /dev/null +++ b/corpus/python/generator-expression/f3fdeb63a1d9.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 20, + "byte": 20 + }, + "end": { + "line": 0, + "col": 21, + "byte": 21 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 20, + "byte": 20 + }, + "end": { + "line": 0, + "col": 21, + "byte": 21 + } + } + }, + "subst": "1" +} \ No newline at end of file diff --git a/corpus/python/generator-expression/f3fdeb63a1d9.py b/corpus/python/generator-expression/f3fdeb63a1d9.py new file mode 100644 index 00000000..81acc882 --- /dev/null +++ b/corpus/python/generator-expression/f3fdeb63a1d9.py @@ -0,0 +1 @@ +list(x for x in [1, 1, 3]) diff --git a/crates/bough-core/src/language/python.rs b/crates/bough-core/src/language/python.rs index 6dd680cc..f6b66e27 100644 --- a/crates/bough-core/src/language/python.rs +++ b/crates/bough-core/src/language/python.rs @@ -91,7 +91,7 @@ impl LanguageDriver for PythonDriver { let condition = node.child_by_field_name("condition")?; Some((MutantKind::Condition, span_from_node(&condition), span_from_node(node))) } - "tuple" if node.named_child_count() > 0 => { + "generator_expression" | "tuple" if node.named_child_count() > 0 => { let span = span_from_node(node); Some((MutantKind::TupleDecl, span.clone(), span)) } @@ -251,6 +251,6 @@ mod tests { #[test] #[ignore] fn debug_tree() { - dump_tree("{k: v for k, v in {\"a\": 1}.items()}"); + dump_tree("list(x for x in [1, 2, 3])"); } } -- knotmirror 0.0.1