From d01dafbb3574fa3284c6e9ca54ce765eed905d21 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 11 Jan 2021 16:04:11 +0100 Subject: [PATCH] Added test to reproduce array bug found with random data --- tests/types/test_array.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/types/test_array.py b/tests/types/test_array.py index 591901cfa..9de51c14a 100644 --- a/tests/types/test_array.py +++ b/tests/types/test_array.py @@ -139,3 +139,14 @@ def test_array_mixed_numbers(array, type): dumper = tx.get_dumper(array, Format.BINARY) dumper.dump(array) assert dumper.oid == builtins[type].array_oid + + +@pytest.mark.xfail +@pytest.mark.parametrize("fmt_in", [Format.BINARY]) # TODO: add Format.TEXT +def test_empty_list_mix(conn, fmt_in): + ph = "%s" if fmt_in == Format.TEXT else "%b" + objs = list(range(3)) + # pro tip: don't get confused with the types + f1, f2 = conn.execute(f"select {ph}, {ph}", (objs, [])).fetchone() + assert f1 == objs + assert f2 == [] -- 2.47.2