PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: go-resty/resty (go)
Issue: SetResult Add nil Check
SetResult Add nil Check, avoid panic
Pull request description: feat: add nil check to SetResult (#503)
fixes #503.

Simply adds a `nil` check to `SetResult` to ensure that it can be used fluently. Also adds a simple unit test to ensure that the current panic will not happen any longer.

Patch:
diff --git a/request.go b/request.go
index e6043d7..e2f9aed 100644
--- a/request.go
+++ b/request.go
@@ -303,7 +303,9 @@ func (r *Request) SetBody(body interface{}) *Request {
 // Accessing a result value from response instance.
 //		response.Result().(*AuthToken)
 func (r *Request) SetResult(res interface{}) *Request {
-	r.Result = getPointer(res)
+	if res != nil {
+		r.Result = getPointer(res)
+	}
 	return r
 }
 


Test patch:
diff --git a/request_test.go b/request_test.go
index 33d524e..06aef36 100644
--- a/request_test.go
+++ b/request_test.go
@@ -1891,3 +1891,13 @@ func TestPostBodyError(t *testing.T) {
 	assertEqual(t, "read error", err.Error())
 	assertNil(t, resp)
 }
+
+func TestSetResultMustNotPanicOnNil(t *testing.T) {
+	defer func() {
+		if r := recover(); r != nil {
+			t.Errorf("must not panic")
+		}
+	}()
+	dc().R().SetResult(nil)
+}
+
Repository: more-itertools/more-itertools (python)
Issue: spy: changing the result list changes the returned iterable
Changing the result list of `spy` also alters the iterable.

```python
In [1]: from more_itertools import spy

In [2]: it = range(10)

In [3]: head, it = spy(it, 3)

In [4]: head[1] = 'bad'

In [5]: list(it)
Out[5]: [0, 'bad', 2, 3, 4, 5, 6, 7, 8, 9]
```

 I think it is a case of implementation details leaking out.
Pull request description: Fix spy to make returned iterable immutable
`spy` returns an list and an iterable, part of which contains all
elements of the list. The problem was the iterable contained the
list within and changing the list changed the iterable.

This commit decouples the iterable from returned list and that
makes it immutable.

fixes #409

Patch:
diff --git a/more_itertools/more.py b/more_itertools/more.py
index f8361ab..fd9e4af 100755
--- a/more_itertools/more.py
+++ b/more_itertools/more.py
@@ -932,7 +932,7 @@ def spy(iterable, n=1):
     it = iter(iterable)
     head = take(n, it)
 
-    return head, chain(head, it)
+    return head.copy(), chain(head, it)
 
 
 def interleave(*iterables):


Test patch:
diff --git a/tests/test_more.py b/tests/test_more.py
index 2e62388..6ba02a7 100644
--- a/tests/test_more.py
+++ b/tests/test_more.py
@@ -933,6 +933,15 @@ class SpyTests(TestCase):
         self.assertEqual(head, [])
         self.assertEqual(list(new_iterable), ['a', 'b', 'c'])
 
+    def test_immutable(self):
+        original_iterable = iter('abcdefg')
+        head, new_iterable = mi.spy(original_iterable, 3)
+        head[0] = 'A'
+        self.assertEqual(head, ['A', 'b', 'c'])
+        self.assertEqual(
+            list(new_iterable), ['a', 'b', 'c', 'd', 'e', 'f', 'g']
+        )
+
 
 class InterleaveTests(TestCase):
     def test_even(self):
Repository: un-ts/synckit (ts)
Issue: Support `import.meta.resolve()` urls 
Currently docs tell you to use `require.resolve('./worker')`

I don't use cjs in new projects and would prefer to use `import.meta.resolve('./worker.ts')` instead


Pull request description: feat: support file url worker path
close #187

Patch:
diff --git a/.changeset/rotten-squids-protect.md b/.changeset/rotten-squids-protect.md
new file mode 100644
index 0000000..d07b93c
--- /dev/null
+++ b/.changeset/rotten-squids-protect.md
@@ -0,0 +1,5 @@
+---
+"synckit": minor
+---
+
+feat: support file url worker path
diff --git a/src/index.ts b/src/index.ts
index 86b4874..6268450 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -113,11 +113,15 @@ export function extractProperties<T>(object?: T) {
 }
 
 export function createSyncFn<T extends AnyFn>(
-  workerPath: string,
+  workerPath: URL | string,
   timeoutOrOptions?: SynckitOptions | number,
 ): Syncify<T> {
   syncFnCache ??= new Map()
 
+  if (typeof workerPath !== 'string' || workerPath.startsWith('file://')) {
+    workerPath = fileURLToPath(workerPath)
+  }
+
   const cachedSyncFn = syncFnCache.get(workerPath)
 
   if (cachedSyncFn) {
@@ -159,7 +163,7 @@ const setupTsRunner = (
   let ext = path.extname(workerPath)
 
   if (
-    !/[/\\]node_modules[/\\]/.test(workerPath) &&
+    !/([/\\])node_modules\1/.test(workerPath) &&
     (!ext || /^\.[cm]?js$/.test(ext))
   ) {
     const workPathWithoutExt = ext


Test patch:
diff --git a/test/fn.spec.ts b/test/fn.spec.ts
index e1c6bd9..9280a3d 100644
--- a/test/fn.spec.ts
+++ b/test/fn.spec.ts
@@ -1,5 +1,6 @@
 import { createRequire } from 'node:module'
 import path from 'node:path'
+import { pathToFileURL } from 'node:url'
 
 import { jest } from '@jest/globals'
 
@@ -244,3 +245,30 @@ test('globalShims options', async () => {
   expect(syncFn(2)).toBe(2)
   expect(syncFn(5, 0)).toBe(5)
 })
+
+test('support file url', async () => {
+  const { createSyncFn } = await import('synckit')
+
+  const syncFn = createSyncFn<AsyncWorkerFn>(pathToFileURL(workerCjsPath), {})
+
+  expect(syncFn(1)).toBe(1)
+  expect(syncFn(2)).toBe(2)
+  expect(syncFn(5, 0)).toBe(5)
+
+  expect(() => createSyncFn(new URL('https://example.com'))).toThrow(
+    'The URL must be of scheme file',
+  )
+})
+
+test('support file url protocol', async () => {
+  const { createSyncFn } = await import('synckit')
+
+  const syncFn = createSyncFn<AsyncWorkerFn>(
+    pathToFileURL(workerCjsPath).href,
+    {},
+  )
+
+  expect(syncFn(1)).toBe(1)
+  expect(syncFn(2)).toBe(2)
+  expect(syncFn(5, 0)).toBe(5)
+})
Repository: reactiflux/discord-irc (js)
Issue: Multicharacter command characters
I put
```json
"commandCharacters": ["@@", "$"]
```
in my config, and it works fine for the prefix $ but not the prefix @@, as it's more than one character. I know it's a rare case but I'm using 2 characters as the input character for my bot, shouldn't be too hard to fix.
Pull request description: Closes #299
(With help from @ekmartin :P I cannot JavaScript)

Patch:
diff --git a/lib/bot.js b/lib/bot.js
index 2587178..619ebcb 100644
--- a/lib/bot.js
+++ b/lib/bot.js
@@ -248,7 +248,7 @@ class Bot {
   }
 
   isCommandMessage(message) {
-    return this.commandCharacters.indexOf(message[0]) !== -1;
+    return this.commandCharacters.some(prefix => message.startsWith(prefix));
   }
 
   static substitutePattern(message, patternMapping) {


Test patch:
diff --git a/test/bot.test.js b/test/bot.test.js
index 23c9610..293fdde 100644
--- a/test/bot.test.js
+++ b/test/bot.test.js
@@ -480,6 +480,30 @@ describe('Bot', function () {
     ClientStub.prototype.say.getCall(1).args.should.deep.equal(['#irc', text]);
   });
 
+  it('should support multi-character command prefixes', function () {
+    const bot = new Bot({ ...config, commandCharacters: ['@@'] });
+    const text = '@@test command';
+    const message = {
+      content: text,
+      mentions: { users: [] },
+      channel: {
+        name: 'discord'
+      },
+      author: {
+        username: 'test',
+        id: 'not bot id'
+      },
+      guild: this.guild
+    };
+    bot.connect();
+
+    bot.sendToIRC(message);
+    ClientStub.prototype.say.getCall(0).args.should.deep.equal([
+      '#irc', 'Command sent from Discord by test:'
+    ]);
+    ClientStub.prototype.say.getCall(1).args.should.deep.equal(['#irc', text]);
+  });
+
   it('should hide usernames for commands to Discord', function () {
     const username = 'ircuser';
     const text = '!command';
Repository: PyCQA/pyflakes (python)
Issue: F811 redefinition: false positive
Hi,

the following MWE
```python
def no_redef(value):
    if value:

        def fun(x, y):
            return x

    else:

        def fun(x, y):
            return y

    return fun


def redef(value):
    match value:
        case True:

            def fun(x, y):
                return x

        case False:

            def fun(x, y):
                return y

    return fun
```
throws the following warning:
```
redef.py:24:13: redefinition of unused 'fun' from line 19
```
i.e. pyflakes complains that the second `def fun` in the `redef` function is a redefinition of the previous definition. In my understanding both functions, `redef` and `no_redef` should be valid.

I use this version of pyflakes:
```
pyflakes --version
3.0.1 Python 3.10.8 on Linux
```

Constantin
Pull request description: allow redefinition of functions across match arms
resolves #771

Patch:
diff --git a/pyflakes/checker.py b/pyflakes/checker.py
index e654afa..db4da49 100644
--- a/pyflakes/checker.py
+++ b/pyflakes/checker.py
@@ -29,8 +29,10 @@ parse_format_string = string.Formatter().parse
 def getAlternatives(n):
     if isinstance(n, ast.If):
         return [n.body]
-    if isinstance(n, ast.Try):
+    elif isinstance(n, ast.Try):
         return [n.body + n.orelse] + [[hdl] for hdl in n.handlers]
+    elif sys.version_info >= (3, 10) and isinstance(n, ast.Match):
+        return [mc.body for mc in n.cases]
 
 
 FOR_TYPES = (ast.For, ast.AsyncFor)


Test patch:
diff --git a/pyflakes/test/test_match.py b/pyflakes/test/test_match.py
index 89826e3..b237523 100644
--- a/pyflakes/test/test_match.py
+++ b/pyflakes/test/test_match.py
@@ -81,3 +81,14 @@ class TestMatch(TestCase):
                 case {'foo': k1, **rest}:
                     print(f'{k1=} {rest=}')
         ''')
+
+    def test_defined_in_different_branches(self):
+        self.flakes('''
+            def f(x):
+                match x:
+                    case 1:
+                        def y(): pass
+                    case _:
+                        def y(): print(1)
+                return y
+        ''')
Repository: yannickcr/eslint-plugin-react (js)
Issue: `boolean-prop-naming` triggers "Cannot read property 'type' of undefined"
Hello,

When I add this rule to my .eslintrc file Visual Studio Code triggers a popup error `Cannot read property 'type' of undefined`.

This is my rule:
`"react/boolean-prop-naming": [1, { "rule": "(^(is|has)[A-Z]([A-Za-z0-9]?)+)|(^[a-z]+(ed|able)$)" }],`

I think this is related somehow to the spread operator as the errors trigger when I type `...test`
Pull request description: Fixes #1369
Fixed a crash in the boolean-prop-naming rule.

Patch:
diff --git a/lib/rules/boolean-prop-naming.js b/lib/rules/boolean-prop-naming.js
index 105b3efa..66462acd 100644
--- a/lib/rules/boolean-prop-naming.js
+++ b/lib/rules/boolean-prop-naming.js
@@ -1,6 +1,6 @@
 /**
  * @fileoverview Enforces consistent naming for boolean props
- * @author Evgueni Naverniouk
+ * @author Ev Haus
  */
 'use strict';
 
@@ -57,7 +57,7 @@ module.exports = {
     function isPropTypesDeclaration(node) {
       // Special case for class properties
       // (babel-eslint does not expose property name so we have to rely on tokens)
-      if (node.type === 'ClassProperty') {
+      if (node && node.type === 'ClassProperty') {
         const tokens = context.getFirstTokens(node, 2);
         if (tokens[0].value === 'propTypes' || (tokens[1] && tokens[1].value === 'propTypes')) {
           return true;


Test patch:
diff --git a/tests/lib/rules/boolean-prop-naming.js b/tests/lib/rules/boolean-prop-naming.js
index 5ff5cc28..3c538703 100644
--- a/tests/lib/rules/boolean-prop-naming.js
+++ b/tests/lib/rules/boolean-prop-naming.js
@@ -1,6 +1,6 @@
 /**
  * @fileoverview Enforces consistent naming for boolean props
- * @author Evgueni Naverniouk
+ * @author Ev Haus
  */
 'use strict';
 
@@ -247,6 +247,16 @@ ruleTester.run('boolean-prop-naming', rule, {
       rule: '^is[A-Z]([A-Za-z0-9]?)+'
     }],
     parser: 'babel-eslint'
+  }, {
+    // Ensure rule doesn't crash on destructured objects [Issue #1369]
+    code: [
+      'var x = {a: 1}',
+      'var y = {...x}'
+    ].join('\n'),
+    options: [{
+      rule: '^is[A-Z]([A-Za-z0-9]?)+'
+    }],
+    parser: 'babel-eslint'
   }],
 
   invalid: [{
Repository: sanic-org/sanic-ext (python)
Issue: OpenAPI extension parses dataclass validators as body
```python
#from pydantic.dataclasses import dataclass
from pydantic.dataclasses import dataclass

@dataclass
class RegisterBody:
    name: str
    email: str
    password: str

    @validator('name')
    def validate_name(cls, v):
        if len(v) < 5:
            raise ValueError('name must be at leasth 5 characters')

@app.post("/register")
@openapi.body({"application/json": RegisterBody})
@validate(json=RegisterBody)
async def register(request, body):
     return json({})
```

The code above produces the OpenAPI `/docs` page to populate a `validator_name` field in the Swagger UI, while for the actual mode it is not a field. Tried with the builting python dataclasses and the Pydantic wrapper too.

![image](https://user-images.githubusercontent.com/3187667/172001173-f0dbb421-3a20-4a2b-9578-9a97a8ade9b3.png)

Sanic v22.3.2
Sanic-ext v22.3.2
Arch Linux x86_64
Python 3.10.4

Pull request description: Better serialization of objects
Closes #89 

Patch:
diff --git a/sanic_ext/extensions/openapi/types.py b/sanic_ext/extensions/openapi/types.py
index 3bf53ef..191132d 100644
--- a/sanic_ext/extensions/openapi/types.py
+++ b/sanic_ext/extensions/openapi/types.py
@@ -2,6 +2,7 @@ import json
 import uuid
 from datetime import date, datetime, time
 from enum import Enum
+from inspect import getmembers, isfunction
 from typing import (
     Any,
     Dict,
@@ -308,7 +309,11 @@ def _serialize(value) -> Any:
 
 def _properties(value: object) -> Dict:
     try:
-        fields = {x: v for x, v in value.__dict__.items()}
+        fields = {
+            x: val
+            for x, v in getmembers(value, _is_property)
+            if (val := _extract(v))
+        }
     except AttributeError:
         fields = {}
 
@@ -318,3 +323,14 @@ def _properties(value: object) -> Dict:
         for k, v in {**get_type_hints(cls), **fields}.items()
         if not k.startswith("_")
     }
+
+
+def _extract(item):
+    if isinstance(item, property):
+        hints = get_type_hints(item.fget)
+        return hints.get("return")
+    return item
+
+
+def _is_property(item):
+    return not isfunction(item)


Test patch:
diff --git a/tests/extensions/openapi/test_schema.py b/tests/extensions/openapi/test_schema.py
index 415691f..c6033a7 100644
--- a/tests/extensions/openapi/test_schema.py
+++ b/tests/extensions/openapi/test_schema.py
@@ -12,8 +12,17 @@ def test_schema_list():
         list1: List[int]
         list2: list[int]
 
+        def no_show(self) -> None:
+            ...
+
+        @property
+        def show(self) -> bool:
+            return True
+
     schema = Schema.make(Foo)
-    schema.serialize() == {
+    serialized = schema.serialize()
+    assert "no_show" not in serialized
+    assert serialized == {
         "type": "object",
         "properties": {
             "list1": {
@@ -24,5 +33,6 @@ def test_schema_list():
                 "type": "array",
                 "items": {"type": "integer", "format": "int32"},
             },
+            "show": {"type": "boolean"},
         },
     }
Repository: sindresorhus/got (ts)
Issue: URI malformed when trying to get URL with URL-encoded chars
Hello,

Catched URI malformed error in new "got", when I trying to send request to URL with URL-encoded chars.
URL examples:
https://www.kinopoisk.ru/community/city/%D2%E0%EB%EB%E8%ED/
https://www.kinopoisk.ru/news/keyword/%C7%E2%E5%E7%E4%ED%FB%E5+%E2%EE%E9%ED%FB/

nodejs: 9.2.0
got: 8.0.0

Failed code:
```js
const got = require('got');

(async () => {
	try {
		const response = await got('https://www.kinopoisk.ru/community/city/%D2%E0%EB%EB%E8%ED/');
		console.log(response);
	} catch (error) {
		console.log(error);
	}
})();
```
```
URIError: URI malformed
    at decodeURI (<anonymous>)
    at module.exports (/Users/kirill-m/git/test/node_modules/normalize-url/index.js:87:21)
    at /Users/kirill-m/git/test/node_modules/cacheable-request/src/index.js:43:16
    at get (/Users/kirill-m/git/test/node_modules/got/index.js:98:20)
    at Promise.resolve.then.size (/Users/kirill-m/git/test/node_modules/got/index.js:274:5)
    at <anonymous>
```

Broken at this commit: https://github.com/sindresorhus/got/commit/3c7920507fae88a5f53d0640b5116fa34a5ed829

Any ideas?
Pull request description: Validate that `url` is UTF-8 encoded
Opted to decode without assignment back to `url` so that requests and other error messages continue to display the user provided `url` value. 

---
Closes #420 

Patch:
diff --git a/index.js b/index.js
index e515eae..89aa283 100644
--- a/index.js
+++ b/index.js
@@ -444,6 +444,13 @@ function normalizeArguments(url, opts) {
 		throw new TypeError(`Parameter \`url\` must be a string or object, not ${is(url)}`);
 	} else if (is.string(url)) {
 		url = url.replace(/^unix:/, 'http://$&');
+
+		try {
+			decodeURI(url);
+		} catch (err) {
+			throw new Error('Parameter `url` must contain valid UTF-8 character sequences');
+		}
+
 		url = urlParseLax(url);
 		if (url.auth) {
 			throw new Error('Basic authentication must be done with the `auth` option');


Test patch:
diff --git a/test/arguments.js b/test/arguments.js
index 1038ac3..6546888 100644
--- a/test/arguments.js
+++ b/test/arguments.js
@@ -29,6 +29,11 @@ test('url is required', async t => {
 	t.regex(err.message, /Parameter `url` must be a string or object, not undefined/);
 });
 
+test('url should be utf-8 encoded', async t => {
+	const err = await t.throws(got(`${s.url}/%D2%E0%EB%EB%E8%ED`));
+	t.regex(err.message, /Parameter `url` must contain valid UTF-8 character sequences/);
+});
+
 test('options are optional', async t => {
 	t.is((await got(`${s.url}/test`)).body, '/test');
 });
Repository: genjidb/genji (go)
Issue: Bad field name when selecting a field using backquotes
```sql
genji> select `a` from foo;
{
  "`a`": 1
}
```

It should be:

```sql
genji> select `a` from foo;
{
  "a": null
}
genji> select `some "long" string` from foo;
{
  "some \"long\" string": null
}
```
Pull request description: Display unquoted field names in result fields
This PR fixes #64 by adding a special case in the parser for FieldSelectors. It makes sure we are always displaying the unquoted version of these fields instead of the raw version entered by the user.

Patch:
diff --git a/sql/parser/select.go b/sql/parser/select.go
index 86da3f1d..dcf3c62c 100644
--- a/sql/parser/select.go
+++ b/sql/parser/select.go
@@ -94,6 +94,12 @@ func (p *Parser) parseResultField() (planner.ResultField, error) {
 		return nil, err
 	}
 
+	// FieldSelectors may be quoted, we make sure we name the result field
+	// with the unquoted name instead.
+	if fs, ok := e.(expr.FieldSelector); ok {
+		lit = fs.String()
+	}
+
 	rf := planner.ResultFieldExpr{Expr: e, ExprName: lit}
 
 	// Check if the AS token exists.


Test patch:
diff --git a/sql/parser/select_test.go b/sql/parser/select_test.go
index 75abda31..1bb4ea28 100644
--- a/sql/parser/select_test.go
+++ b/sql/parser/select_test.go
@@ -39,6 +39,14 @@ func TestParserSelect(t *testing.T) {
 					"test",
 				)),
 			false},
+		{"WithFieldsWithQuotes", "SELECT `long \"field\"` FROM test",
+			planner.NewTree(
+				planner.NewProjectionNode(
+					planner.NewTableInputNode("test"),
+					[]planner.ResultField{planner.ResultFieldExpr{Expr: expr.FieldSelector([]string{"long \"field\""}), ExprName: "long \"field\""}},
+					"test",
+				)),
+			false},
 		{"WithAlias", "SELECT a AS A, b FROM test",
 			planner.NewTree(
 				planner.NewProjectionNode(
Repository: narwhals-dev/narwhals (python)
Issue: bug: `ArrowSeries.scatter` raises out of bound error
pyarrow backed series raises an out of bound error in scatter if `indices`:

- is not 0
- are not full length of the series

Repro:

```py
import narwhals as nw
import pyarrow as pa

tbl = pa.table({"a": [1, 2, 3], "b": [142, 124, 132]})
frame = nw.from_native(tbl, eager_only=True)
ser = frame["a"]

try:
    result = ser.scatter(1, 999)
except Exception as exc:
    print(exc)


try:
    result = ser.scatter([0, 2], [999, 888])
except Exception as exc:
    print(exc)
```

> Index 1 out of bounds
> Index 2 out of bounds


Pull request description: fix: `scatter` was raising unnecessarily for pyarrow
closes #2862

<!--
# Thanks for contributing a pull request! 
## Please make sure you see our contribution guidelines: https://github.com/narwhals-dev/narwhals/blob/main/CONTRIBUTING.md
-->

## What type of PR is this? (check all applicable)

- [ ] 💾 Refactor
- [ ] ✨ Feature
- [ ] 🐛 Bug Fix
- [ ] 🔧 Optimization
- [ ] 📝 Documentation
- [ ] ✅ Test
- [ ] 🐳 Other

## Related issues

- Related issue #\<issue number\>
- Closes #\<issue number\>

## Checklist

- [ ] Code follows style guide (ruff)
- [ ] Tests added
- [ ] Documented the changes

## If you have comments or can explain your changes, please do so below


Patch:
diff --git a/narwhals/_arrow/series.py b/narwhals/_arrow/series.py
index e22d20fe..7aad2638 100644
--- a/narwhals/_arrow/series.py
+++ b/narwhals/_arrow/series.py
@@ -467,9 +467,7 @@ class ArrowSeries(EagerSeries["ChunkedArrayAny"]):
         # - Missing `replacements` type
         # - Missing return type
         pc_replace_with_mask: Incomplete = pc.replace_with_mask
-        return self._with_native(
-            pc_replace_with_mask(self.native, mask, values_native.take(indices_native))
-        )
+        return self._with_native(pc_replace_with_mask(self.native, mask, values_native))
 
     def to_list(self) -> list[Any]:
         return self.native.to_pylist()


Test patch:
diff --git a/tests/series_only/scatter_test.py b/tests/series_only/scatter_test.py
index 2e5cbaa1..65b8c3d9 100644
--- a/tests/series_only/scatter_test.py
+++ b/tests/series_only/scatter_test.py
@@ -61,3 +61,19 @@ def test_scatter_unordered_indices(constructor_eager: ConstructorEager) -> None:
     df = nw.from_native(constructor_eager(data))
     result = df["a"].scatter(indices, df["a"])
     assert_equal_data({"a": result}, {"a": [10, 12, 5, 6, 2, 9, 16]})
+
+
+def test_scatter_2862(constructor_eager: ConstructorEager) -> None:
+    df = nw.from_native(
+        constructor_eager({"a": [1, 2, 3], "b": [142, 124, 132]}), eager_only=True
+    )
+    ser = df["a"]
+    result = ser.scatter(1, 999)
+    expected = {"a": [1, 999, 3]}
+    assert_equal_data({"a": result}, expected)
+    result = ser.scatter([0, 2], [999, 888])
+    expected = {"a": [999, 2, 888]}
+    assert_equal_data({"a": result}, expected)
+    result = ser.scatter([2, 0], [999, 888])
+    expected = {"a": [888, 2, 999]}
+    assert_equal_data({"a": result}, expected)