From 62a2c7f548fc207a38eaa52408b0f319af83b923 Mon Sep 17 00:00:00 2001 From: Freddie Ridell Date: Thu, 19 Mar 2026 09:54:29 +0000 Subject: [PATCH] py: list-comprehension --- .../106eb8ff2cdd.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/106eb8ff2cdd.py | 1 + .../129809e42375.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/129809e42375.py | 1 + .../1f287bde7acd.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/1f287bde7acd.py | 1 + .../2acc45e93b9e.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/2acc45e93b9e.py | 1 + .../2d6021bc4a11.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/2d6021bc4a11.py | 1 + .../37517e5f3dc6.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/37517e5f3dc6.py | 1 + .../44ddf2e5cd72.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/44ddf2e5cd72.py | 1 + .../464ff18500ad.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/464ff18500ad.py | 1 + .../480af4c37f3f.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/480af4c37f3f.py | 1 + .../526eedf7c2c5.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/526eedf7c2c5.py | 1 + .../52759628014b.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/52759628014b.py | 1 + .../65a7e141825f.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/65a7e141825f.py | 1 + .../6a22c57e47e3.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/6a22c57e47e3.py | 1 + .../838f6d728e53.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/838f6d728e53.py | 1 + .../8a796714130a.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/8a796714130a.py | 1 + .../a80d761cd910.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/a80d761cd910.py | 1 + .../d50b89369ea2.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/d50b89369ea2.py | 1 + .../d9825424ac66.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/d9825424ac66.py | 1 + .../ee4558355913.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/ee4558355913.py | 1 + .../f7b1d39c22af.mutation.json | 36 +++++++++++++++++++ .../python/list-comprehension/f7b1d39c22af.py | 1 + crates/bough-core/src/language/python.rs | 4 +-- 41 files changed, 742 insertions(+), 2 deletions(-) create mode 100644 corpus/python/list-comprehension/106eb8ff2cdd.mutation.json create mode 100644 corpus/python/list-comprehension/106eb8ff2cdd.py create mode 100644 corpus/python/list-comprehension/129809e42375.mutation.json create mode 100644 corpus/python/list-comprehension/129809e42375.py create mode 100644 corpus/python/list-comprehension/1f287bde7acd.mutation.json create mode 100644 corpus/python/list-comprehension/1f287bde7acd.py create mode 100644 corpus/python/list-comprehension/2acc45e93b9e.mutation.json create mode 100644 corpus/python/list-comprehension/2acc45e93b9e.py create mode 100644 corpus/python/list-comprehension/2d6021bc4a11.mutation.json create mode 100644 corpus/python/list-comprehension/2d6021bc4a11.py create mode 100644 corpus/python/list-comprehension/37517e5f3dc6.mutation.json create mode 100644 corpus/python/list-comprehension/37517e5f3dc6.py create mode 100644 corpus/python/list-comprehension/44ddf2e5cd72.mutation.json create mode 100644 corpus/python/list-comprehension/44ddf2e5cd72.py create mode 100644 corpus/python/list-comprehension/464ff18500ad.mutation.json create mode 100644 corpus/python/list-comprehension/464ff18500ad.py create mode 100644 corpus/python/list-comprehension/480af4c37f3f.mutation.json create mode 100644 corpus/python/list-comprehension/480af4c37f3f.py create mode 100644 corpus/python/list-comprehension/526eedf7c2c5.mutation.json create mode 100644 corpus/python/list-comprehension/526eedf7c2c5.py create mode 100644 corpus/python/list-comprehension/52759628014b.mutation.json create mode 100644 corpus/python/list-comprehension/52759628014b.py create mode 100644 corpus/python/list-comprehension/65a7e141825f.mutation.json create mode 100644 corpus/python/list-comprehension/65a7e141825f.py create mode 100644 corpus/python/list-comprehension/6a22c57e47e3.mutation.json create mode 100644 corpus/python/list-comprehension/6a22c57e47e3.py create mode 100644 corpus/python/list-comprehension/838f6d728e53.mutation.json create mode 100644 corpus/python/list-comprehension/838f6d728e53.py create mode 100644 corpus/python/list-comprehension/8a796714130a.mutation.json create mode 100644 corpus/python/list-comprehension/8a796714130a.py create mode 100644 corpus/python/list-comprehension/a80d761cd910.mutation.json create mode 100644 corpus/python/list-comprehension/a80d761cd910.py create mode 100644 corpus/python/list-comprehension/d50b89369ea2.mutation.json create mode 100644 corpus/python/list-comprehension/d50b89369ea2.py create mode 100644 corpus/python/list-comprehension/d9825424ac66.mutation.json create mode 100644 corpus/python/list-comprehension/d9825424ac66.py create mode 100644 corpus/python/list-comprehension/ee4558355913.mutation.json create mode 100644 corpus/python/list-comprehension/ee4558355913.py create mode 100644 corpus/python/list-comprehension/f7b1d39c22af.mutation.json create mode 100644 corpus/python/list-comprehension/f7b1d39c22af.py diff --git a/corpus/python/list-comprehension/106eb8ff2cdd.mutation.json b/corpus/python/list-comprehension/106eb8ff2cdd.mutation.json new file mode 100644 index 00000000..f11b00fb --- /dev/null +++ b/corpus/python/list-comprehension/106eb8ff2cdd.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 13, + "byte": 13 + }, + "end": { + "line": 0, + "col": 14, + "byte": 14 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 13, + "byte": 13 + }, + "end": { + "line": 0, + "col": 14, + "byte": 14 + } + } + }, + "subst": "float('nan')" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/106eb8ff2cdd.py b/corpus/python/list-comprehension/106eb8ff2cdd.py new file mode 100644 index 00000000..01d65fc3 --- /dev/null +++ b/corpus/python/list-comprehension/106eb8ff2cdd.py @@ -0,0 +1 @@ +[x for x in [float('nan'), 2, 3]] diff --git a/corpus/python/list-comprehension/129809e42375.mutation.json b/corpus/python/list-comprehension/129809e42375.mutation.json new file mode 100644 index 00000000..4bd139d9 --- /dev/null +++ b/corpus/python/list-comprehension/129809e42375.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 16, + "byte": 16 + }, + "end": { + "line": 0, + "col": 17, + "byte": 17 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 16, + "byte": 16 + }, + "end": { + "line": 0, + "col": 17, + "byte": 17 + } + } + }, + "subst": "float('-inf')" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/129809e42375.py b/corpus/python/list-comprehension/129809e42375.py new file mode 100644 index 00000000..e616c452 --- /dev/null +++ b/corpus/python/list-comprehension/129809e42375.py @@ -0,0 +1 @@ +[x for x in [1, float('-inf'), 3]] diff --git a/corpus/python/list-comprehension/1f287bde7acd.mutation.json b/corpus/python/list-comprehension/1f287bde7acd.mutation.json new file mode 100644 index 00000000..7e996a6b --- /dev/null +++ b/corpus/python/list-comprehension/1f287bde7acd.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 13, + "byte": 13 + }, + "end": { + "line": 0, + "col": 14, + "byte": 14 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 13, + "byte": 13 + }, + "end": { + "line": 0, + "col": 14, + "byte": 14 + } + } + }, + "subst": "-1" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/1f287bde7acd.py b/corpus/python/list-comprehension/1f287bde7acd.py new file mode 100644 index 00000000..b00eb556 --- /dev/null +++ b/corpus/python/list-comprehension/1f287bde7acd.py @@ -0,0 +1 @@ +[x for x in [-1, 2, 3]] diff --git a/corpus/python/list-comprehension/2acc45e93b9e.mutation.json b/corpus/python/list-comprehension/2acc45e93b9e.mutation.json new file mode 100644 index 00000000..544a79b5 --- /dev/null +++ b/corpus/python/list-comprehension/2acc45e93b9e.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 16, + "byte": 16 + }, + "end": { + "line": 0, + "col": 17, + "byte": 17 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 16, + "byte": 16 + }, + "end": { + "line": 0, + "col": 17, + "byte": 17 + } + } + }, + "subst": "1" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/2acc45e93b9e.py b/corpus/python/list-comprehension/2acc45e93b9e.py new file mode 100644 index 00000000..472faae8 --- /dev/null +++ b/corpus/python/list-comprehension/2acc45e93b9e.py @@ -0,0 +1 @@ +[x for x in [1, 1, 3]] diff --git a/corpus/python/list-comprehension/2d6021bc4a11.mutation.json b/corpus/python/list-comprehension/2d6021bc4a11.mutation.json new file mode 100644 index 00000000..367ed925 --- /dev/null +++ b/corpus/python/list-comprehension/2d6021bc4a11.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 16, + "byte": 16 + }, + "end": { + "line": 0, + "col": 17, + "byte": 17 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 16, + "byte": 16 + }, + "end": { + "line": 0, + "col": 17, + "byte": 17 + } + } + }, + "subst": "float('inf')" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/2d6021bc4a11.py b/corpus/python/list-comprehension/2d6021bc4a11.py new file mode 100644 index 00000000..1119521c --- /dev/null +++ b/corpus/python/list-comprehension/2d6021bc4a11.py @@ -0,0 +1 @@ +[x for x in [1, float('inf'), 3]] diff --git a/corpus/python/list-comprehension/37517e5f3dc6.mutation.json b/corpus/python/list-comprehension/37517e5f3dc6.mutation.json new file mode 100644 index 00000000..095396ec --- /dev/null +++ b/corpus/python/list-comprehension/37517e5f3dc6.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "ArrayDecl": "Inline" + }, + "subst_span": { + "start": { + "line": 0, + "col": 0, + "byte": 0 + }, + "end": { + "line": 0, + "col": 22, + "byte": 22 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 0, + "byte": 0 + }, + "end": { + "line": 0, + "col": 22, + "byte": 22 + } + } + }, + "subst": "[]" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/37517e5f3dc6.py b/corpus/python/list-comprehension/37517e5f3dc6.py new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/corpus/python/list-comprehension/37517e5f3dc6.py @@ -0,0 +1 @@ +[] diff --git a/corpus/python/list-comprehension/44ddf2e5cd72.mutation.json b/corpus/python/list-comprehension/44ddf2e5cd72.mutation.json new file mode 100644 index 00000000..09f73e25 --- /dev/null +++ b/corpus/python/list-comprehension/44ddf2e5cd72.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 19, + "byte": 19 + }, + "end": { + "line": 0, + "col": 20, + "byte": 20 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 19, + "byte": 19 + }, + "end": { + "line": 0, + "col": 20, + "byte": 20 + } + } + }, + "subst": "-1" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/44ddf2e5cd72.py b/corpus/python/list-comprehension/44ddf2e5cd72.py new file mode 100644 index 00000000..828067ae --- /dev/null +++ b/corpus/python/list-comprehension/44ddf2e5cd72.py @@ -0,0 +1 @@ +[x for x in [1, 2, -1]] diff --git a/corpus/python/list-comprehension/464ff18500ad.mutation.json b/corpus/python/list-comprehension/464ff18500ad.mutation.json new file mode 100644 index 00000000..5e1dbbfb --- /dev/null +++ b/corpus/python/list-comprehension/464ff18500ad.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 19, + "byte": 19 + }, + "end": { + "line": 0, + "col": 20, + "byte": 20 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 19, + "byte": 19 + }, + "end": { + "line": 0, + "col": 20, + "byte": 20 + } + } + }, + "subst": "float('nan')" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/464ff18500ad.py b/corpus/python/list-comprehension/464ff18500ad.py new file mode 100644 index 00000000..7c60d0d1 --- /dev/null +++ b/corpus/python/list-comprehension/464ff18500ad.py @@ -0,0 +1 @@ +[x for x in [1, 2, float('nan')]] diff --git a/corpus/python/list-comprehension/480af4c37f3f.mutation.json b/corpus/python/list-comprehension/480af4c37f3f.mutation.json new file mode 100644 index 00000000..1bb0b66f --- /dev/null +++ b/corpus/python/list-comprehension/480af4c37f3f.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 16, + "byte": 16 + }, + "end": { + "line": 0, + "col": 17, + "byte": 17 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 16, + "byte": 16 + }, + "end": { + "line": 0, + "col": 17, + "byte": 17 + } + } + }, + "subst": "-1" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/480af4c37f3f.py b/corpus/python/list-comprehension/480af4c37f3f.py new file mode 100644 index 00000000..ffdc16a2 --- /dev/null +++ b/corpus/python/list-comprehension/480af4c37f3f.py @@ -0,0 +1 @@ +[x for x in [1, -1, 3]] diff --git a/corpus/python/list-comprehension/526eedf7c2c5.mutation.json b/corpus/python/list-comprehension/526eedf7c2c5.mutation.json new file mode 100644 index 00000000..ce77655c --- /dev/null +++ b/corpus/python/list-comprehension/526eedf7c2c5.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 19, + "byte": 19 + }, + "end": { + "line": 0, + "col": 20, + "byte": 20 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 19, + "byte": 19 + }, + "end": { + "line": 0, + "col": 20, + "byte": 20 + } + } + }, + "subst": "0" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/526eedf7c2c5.py b/corpus/python/list-comprehension/526eedf7c2c5.py new file mode 100644 index 00000000..8ac08de2 --- /dev/null +++ b/corpus/python/list-comprehension/526eedf7c2c5.py @@ -0,0 +1 @@ +[x for x in [1, 2, 0]] diff --git a/corpus/python/list-comprehension/52759628014b.mutation.json b/corpus/python/list-comprehension/52759628014b.mutation.json new file mode 100644 index 00000000..82cc161b --- /dev/null +++ b/corpus/python/list-comprehension/52759628014b.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 19, + "byte": 19 + }, + "end": { + "line": 0, + "col": 20, + "byte": 20 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 19, + "byte": 19 + }, + "end": { + "line": 0, + "col": 20, + "byte": 20 + } + } + }, + "subst": "float('-inf')" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/52759628014b.py b/corpus/python/list-comprehension/52759628014b.py new file mode 100644 index 00000000..2beaa90e --- /dev/null +++ b/corpus/python/list-comprehension/52759628014b.py @@ -0,0 +1 @@ +[x for x in [1, 2, float('-inf')]] diff --git a/corpus/python/list-comprehension/65a7e141825f.mutation.json b/corpus/python/list-comprehension/65a7e141825f.mutation.json new file mode 100644 index 00000000..3814d75b --- /dev/null +++ b/corpus/python/list-comprehension/65a7e141825f.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 13, + "byte": 13 + }, + "end": { + "line": 0, + "col": 14, + "byte": 14 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 13, + "byte": 13 + }, + "end": { + "line": 0, + "col": 14, + "byte": 14 + } + } + }, + "subst": "float('-inf')" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/65a7e141825f.py b/corpus/python/list-comprehension/65a7e141825f.py new file mode 100644 index 00000000..8cd473bc --- /dev/null +++ b/corpus/python/list-comprehension/65a7e141825f.py @@ -0,0 +1 @@ +[x for x in [float('-inf'), 2, 3]] diff --git a/corpus/python/list-comprehension/6a22c57e47e3.mutation.json b/corpus/python/list-comprehension/6a22c57e47e3.mutation.json new file mode 100644 index 00000000..05d601ec --- /dev/null +++ b/corpus/python/list-comprehension/6a22c57e47e3.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 13, + "byte": 13 + }, + "end": { + "line": 0, + "col": 14, + "byte": 14 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 13, + "byte": 13 + }, + "end": { + "line": 0, + "col": 14, + "byte": 14 + } + } + }, + "subst": "0" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/6a22c57e47e3.py b/corpus/python/list-comprehension/6a22c57e47e3.py new file mode 100644 index 00000000..b1b9d89a --- /dev/null +++ b/corpus/python/list-comprehension/6a22c57e47e3.py @@ -0,0 +1 @@ +[x for x in [0, 2, 3]] diff --git a/corpus/python/list-comprehension/838f6d728e53.mutation.json b/corpus/python/list-comprehension/838f6d728e53.mutation.json new file mode 100644 index 00000000..eb7c7cbe --- /dev/null +++ b/corpus/python/list-comprehension/838f6d728e53.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 19, + "byte": 19 + }, + "end": { + "line": 0, + "col": 20, + "byte": 20 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 19, + "byte": 19 + }, + "end": { + "line": 0, + "col": 20, + "byte": 20 + } + } + }, + "subst": "1" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/838f6d728e53.py b/corpus/python/list-comprehension/838f6d728e53.py new file mode 100644 index 00000000..eb148f90 --- /dev/null +++ b/corpus/python/list-comprehension/838f6d728e53.py @@ -0,0 +1 @@ +[x for x in [1, 2, 1]] diff --git a/corpus/python/list-comprehension/8a796714130a.mutation.json b/corpus/python/list-comprehension/8a796714130a.mutation.json new file mode 100644 index 00000000..ec499aee --- /dev/null +++ b/corpus/python/list-comprehension/8a796714130a.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 16, + "byte": 16 + }, + "end": { + "line": 0, + "col": 17, + "byte": 17 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 16, + "byte": 16 + }, + "end": { + "line": 0, + "col": 17, + "byte": 17 + } + } + }, + "subst": "float('nan')" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/8a796714130a.py b/corpus/python/list-comprehension/8a796714130a.py new file mode 100644 index 00000000..dc0b5205 --- /dev/null +++ b/corpus/python/list-comprehension/8a796714130a.py @@ -0,0 +1 @@ +[x for x in [1, float('nan'), 3]] diff --git a/corpus/python/list-comprehension/a80d761cd910.mutation.json b/corpus/python/list-comprehension/a80d761cd910.mutation.json new file mode 100644 index 00000000..157e88f3 --- /dev/null +++ b/corpus/python/list-comprehension/a80d761cd910.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "ArrayDecl": "Inline" + }, + "subst_span": { + "start": { + "line": 0, + "col": 12, + "byte": 12 + }, + "end": { + "line": 0, + "col": 21, + "byte": 21 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 12, + "byte": 12 + }, + "end": { + "line": 0, + "col": 21, + "byte": 21 + } + } + }, + "subst": "[]" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/a80d761cd910.py b/corpus/python/list-comprehension/a80d761cd910.py new file mode 100644 index 00000000..16da891d --- /dev/null +++ b/corpus/python/list-comprehension/a80d761cd910.py @@ -0,0 +1 @@ +[x for x in []] diff --git a/corpus/python/list-comprehension/d50b89369ea2.mutation.json b/corpus/python/list-comprehension/d50b89369ea2.mutation.json new file mode 100644 index 00000000..ff4b2a7b --- /dev/null +++ b/corpus/python/list-comprehension/d50b89369ea2.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 19, + "byte": 19 + }, + "end": { + "line": 0, + "col": 20, + "byte": 20 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 19, + "byte": 19 + }, + "end": { + "line": 0, + "col": 20, + "byte": 20 + } + } + }, + "subst": "float('inf')" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/d50b89369ea2.py b/corpus/python/list-comprehension/d50b89369ea2.py new file mode 100644 index 00000000..6fd8195d --- /dev/null +++ b/corpus/python/list-comprehension/d50b89369ea2.py @@ -0,0 +1 @@ +[x for x in [1, 2, float('inf')]] diff --git a/corpus/python/list-comprehension/d9825424ac66.mutation.json b/corpus/python/list-comprehension/d9825424ac66.mutation.json new file mode 100644 index 00000000..3c2e63bd --- /dev/null +++ b/corpus/python/list-comprehension/d9825424ac66.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 13, + "byte": 13 + }, + "end": { + "line": 0, + "col": 14, + "byte": 14 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 13, + "byte": 13 + }, + "end": { + "line": 0, + "col": 14, + "byte": 14 + } + } + }, + "subst": "1" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/d9825424ac66.py b/corpus/python/list-comprehension/d9825424ac66.py new file mode 100644 index 00000000..ff04f502 --- /dev/null +++ b/corpus/python/list-comprehension/d9825424ac66.py @@ -0,0 +1 @@ +[x for x in [1, 2, 3]] diff --git a/corpus/python/list-comprehension/ee4558355913.mutation.json b/corpus/python/list-comprehension/ee4558355913.mutation.json new file mode 100644 index 00000000..6ccff64a --- /dev/null +++ b/corpus/python/list-comprehension/ee4558355913.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 13, + "byte": 13 + }, + "end": { + "line": 0, + "col": 14, + "byte": 14 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 13, + "byte": 13 + }, + "end": { + "line": 0, + "col": 14, + "byte": 14 + } + } + }, + "subst": "float('inf')" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/ee4558355913.py b/corpus/python/list-comprehension/ee4558355913.py new file mode 100644 index 00000000..1dfc1407 --- /dev/null +++ b/corpus/python/list-comprehension/ee4558355913.py @@ -0,0 +1 @@ +[x for x in [float('inf'), 2, 3]] diff --git a/corpus/python/list-comprehension/f7b1d39c22af.mutation.json b/corpus/python/list-comprehension/f7b1d39c22af.mutation.json new file mode 100644 index 00000000..9a22f6cb --- /dev/null +++ b/corpus/python/list-comprehension/f7b1d39c22af.mutation.json @@ -0,0 +1,36 @@ +{ + "mutant": { + "lang": "py", + "twig": [ + "src/a.py" + ], + "kind": { + "Literal": "Number" + }, + "subst_span": { + "start": { + "line": 0, + "col": 16, + "byte": 16 + }, + "end": { + "line": 0, + "col": 17, + "byte": 17 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 16, + "byte": 16 + }, + "end": { + "line": 0, + "col": 17, + "byte": 17 + } + } + }, + "subst": "0" +} \ No newline at end of file diff --git a/corpus/python/list-comprehension/f7b1d39c22af.py b/corpus/python/list-comprehension/f7b1d39c22af.py new file mode 100644 index 00000000..833be9c1 --- /dev/null +++ b/corpus/python/list-comprehension/f7b1d39c22af.py @@ -0,0 +1 @@ +[x for x in [1, 0, 3]] diff --git a/crates/bough-core/src/language/python.rs b/crates/bough-core/src/language/python.rs index b9d8a1c3..817b4dbc 100644 --- a/crates/bough-core/src/language/python.rs +++ b/crates/bough-core/src/language/python.rs @@ -99,7 +99,7 @@ impl LanguageDriver for PythonDriver { let span = span_from_node(node); Some((MutantKind::DictDecl, span.clone(), span)) } - "list" if node.named_child_count() > 0 => { + "list_comprehension" | "list" if node.named_child_count() > 0 => { let span = span_from_node(node); Some((MutantKind::ArrayDecl(crate::mutant::ArrayDeclKind::Inline), span.clone(), span)) } @@ -251,6 +251,6 @@ mod tests { #[test] #[ignore] fn debug_tree() { - dump_tree("x = 1\nassert x > 0"); + dump_tree("[x for x in [1, 2, 3]]"); } } -- knotmirror 0.0.1