Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: test_binops fails in multiple variations on 1.4.2 #46618

Closed
2 of 3 tasks
mweinelt opened this issue Apr 2, 2022 · 7 comments
Closed
2 of 3 tasks

BUG: test_binops fails in multiple variations on 1.4.2 #46618

mweinelt opened this issue Apr 2, 2022 · 7 comments
Labels
Bug Closing Candidate May be closeable, needs more eyeballs Duplicate Report Duplicate issue or pull request Linux Linux OS metadata _metadata, .attrs Testing pandas testing functions or related to the test suite

Comments

@mweinelt
Copy link

mweinelt commented Apr 2, 2022

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

I'm running the test suite.

Issue Description

I see tests/generic/test_finalize.py::test_binops failing in a number of variations on pandas 1.4.2.

_________________________ test_binops[add-args0-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[add-args0-right]>>
args = (1, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <built-in function add>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
_________________________ test_binops[add-args4-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[add-args4-right]>>
args = (0    1
dtype: int64, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <built-in function add>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
________________________ test_binops[radd-args0-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[radd-args0-right]>>
args = (1, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <function radd at 0x7fff7ba33af0>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
________________________ test_binops[radd-args4-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[radd-args4-right]>>
args = (0    1
dtype: int64, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <function radd at 0x7fff7ba33af0>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
_________________________ test_binops[sub-args0-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[sub-args0-right]>>
args = (1, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <built-in function sub>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
_________________________ test_binops[sub-args4-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[sub-args4-right]>>
args = (0    1
dtype: int64, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <built-in function sub>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
________________________ test_binops[rsub-args0-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[rsub-args0-right]>>
args = (1, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <function rsub at 0x7fff7ba33b80>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
________________________ test_binops[rsub-args4-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[rsub-args4-right]>>
args = (0    1
dtype: int64, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <function rsub at 0x7fff7ba33b80>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
_________________________ test_binops[mul-args0-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[mul-args0-right]>>
args = (1, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <built-in function mul>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
_________________________ test_binops[mul-args4-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[mul-args4-right]>>
args = (0    1
dtype: int64, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <built-in function mul>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
________________________ test_binops[rmul-args0-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[rmul-args0-right]>>
args = (1, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <function rmul at 0x7fff7ba33c10>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
________________________ test_binops[rmul-args4-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[rmul-args4-right]>>
args = (0    1
dtype: int64, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <function rmul at 0x7fff7ba33c10>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
_______________________ test_binops[truediv-args0-right] _______________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[truediv-args0-right]>>
args = (1, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <built-in function truediv>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
_______________________ test_binops[truediv-args4-right] _______________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[truediv-args4-right]>>
args = (0    1
dtype: int64, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <built-in function truediv>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
______________________ test_binops[rtruediv-args0-right] _______________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[rtruediv-args0-right]>>
args = (1, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <function rtruediv at 0x7fff7ba33d30>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
______________________ test_binops[rtruediv-args4-right] _______________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[rtruediv-args4-right]>>
args = (0    1
dtype: int64, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <function rtruediv at 0x7fff7ba33d30>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
______________________ test_binops[floordiv-args0-right] _______________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[floordiv-args0-right]>>
args = (1, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <built-in function floordiv>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
______________________ test_binops[floordiv-args4-right] _______________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[floordiv-args4-right]>>
args = (0    1
dtype: int64, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <built-in function floordiv>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
______________________ test_binops[rfloordiv-args0-right] ______________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[rfloordiv-args0-right]>>
args = (1, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <function rfloordiv at 0x7fff7ba33dc0>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
______________________ test_binops[rfloordiv-args4-right] ______________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[rfloordiv-args4-right]>>
args = (0    1
dtype: int64, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <function rfloordiv at 0x7fff7ba33dc0>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
_________________________ test_binops[mod-args0-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[mod-args0-right]>>
args = (1, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <built-in function mod>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
_________________________ test_binops[mod-args4-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[mod-args4-right]>>
args = (0    1
dtype: int64, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <built-in function mod>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
________________________ test_binops[rmod-args0-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[rmod-args0-right]>>
args = (1, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <function rmod at 0x7fff7ba33e50>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
________________________ test_binops[rmod-args4-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[rmod-args4-right]>>
args = (0    1
dtype: int64, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <function rmod at 0x7fff7ba33e50>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
_________________________ test_binops[pow-args0-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[pow-args0-right]>>
args = (1, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <built-in function pow>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
_________________________ test_binops[pow-args4-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[pow-args4-right]>>
args = (0    1
dtype: int64, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <built-in function pow>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
________________________ test_binops[rpow-args0-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[rpow-args0-right]>>
args = (1, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <function rpow at 0x7fff7ba33f70>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError
________________________ test_binops[rpow-args4-right] _________________________
[gw0] linux -- Python 3.9.11 /nix/store/09ggk4k8wnf1z17yi65fvcbn1ydipx9b-python3-3.9.11/bin/python3.9
request = <FixtureRequest for <Function test_binops[rpow-args4-right]>>
args = (0    1
dtype: int64, 0    1
dtype: int64), annotate = 'right'
all_arithmetic_functions = <function rpow at 0x7fff7ba33f70>

    @pytest.mark.parametrize("annotate", ["left", "right", "both"])
    @pytest.mark.parametrize(
        "args",
        [
            (1, pd.Series([1])),
            (1, pd.DataFrame({"A": [1]})),
            (pd.Series([1]), 1),
            (pd.DataFrame({"A": [1]}), 1),
            (pd.Series([1]), pd.Series([1])),
            (pd.DataFrame({"A": [1]}), pd.DataFrame({"A": [1]})),
            (pd.Series([1]), pd.DataFrame({"A": [1]})),
            (pd.DataFrame({"A": [1]}), pd.Series([1])),
        ],
    )
    def test_binops(request, args, annotate, all_arithmetic_functions):
        # This generates 326 tests... Is that needed?
        left, right = args
        if annotate == "both" and isinstance(left, int) or isinstance(right, int):
            return
    
        if isinstance(left, pd.DataFrame) or isinstance(right, pd.DataFrame):
            request.node.add_marker(pytest.mark.xfail(reason="not implemented"))
    
        if annotate in {"left", "both"} and not isinstance(left, int):
            left.attrs = {"a": 1}
        if annotate in {"left", "both"} and not isinstance(right, int):
            right.attrs = {"a": 1}
    
        result = all_arithmetic_functions(left, right)
>       assert result.attrs == {"a": 1}
E       AssertionError: assert {} == {'a': 1}
E         Right contains 1 more item:
E         {'a': 1}
E         Use -v to get more diff

tests/generic/test_finalize.py:572: AssertionError

Expected Behavior

Ideally tests should pass, we run them to verify our packaging in NixOS works.

Installed Versions

INSTALLED VERSIONS

commit : 4bfe3d0
python : 3.9.11.final.0
python-bits : 64
OS : Linux
OS-release : 5.16.15
Version : #1-NixOS SMP PREEMPT Wed Mar 16 13:26:52 UTC 2022
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8

pandas : 1.4.2
numpy : 1.22.3
pytz : 2022.1
dateutil : 2.8.2
pip : None
setuptools : None
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
brotli : None
fastparquet : None
fsspec : None
gcsfs : None
markupsafe : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : None
snappy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
zstandard : None

@mweinelt mweinelt added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 2, 2022
@simonjayhawkins simonjayhawkins added this to the 1.4.3 milestone Apr 3, 2022
@simonjayhawkins
Copy link
Member

@mweinelt Thanks for the report

I see tests/generic/test_finalize.py::test_binops failing in a number of variations on pandas 1.4.2.

This worked in 1.4.1?

@simonjayhawkins simonjayhawkins added the Needs Info Clarification about behavior needed to assess issue label Apr 3, 2022
@mweinelt
Copy link
Author

mweinelt commented Apr 3, 2022

I think it was due to some dependency upgrade, so it broke in 1.4.1 as well.

I'm trying to narrow it down right now, my first suspects would be numpy (ugprade from 1.21.5 to 1.22.3) and hypothesis (upgrade from 6.38.0 to 6.40.0 and later 6.41.0).

Updates:

  • It's not numpy
  • It's not hypothesis
  • It's not pytest (6.2.5, 7.0.1, 7.1.1)

@simonjayhawkins simonjayhawkins added metadata _metadata, .attrs and removed Needs Info Clarification about behavior needed to assess issue labels Jun 20, 2022
@simonjayhawkins
Copy link
Member

removing milestone for now until it is clear where the problem is.

@simonjayhawkins simonjayhawkins modified the milestones: 1.4.3, Contributions Welcome Jun 22, 2022
@mroeschke
Copy link
Member

Do you have pytest-randomly installed? The tracebacks looks similar to #34373 so might be a duplicate

@mroeschke mroeschke added Closing Candidate May be closeable, needs more eyeballs and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 6, 2022
@mweinelt
Copy link
Author

mweinelt commented Jul 6, 2022

No, we never had pytest-randomly installed for this package's tests.

@mroeschke
Copy link
Member

Possibly another dependency installed it? Apparently this package caused the same failures #34373 (comment)

@simonjayhawkins simonjayhawkins added Duplicate Report Duplicate issue or pull request Testing pandas testing functions or related to the test suite Linux Linux OS labels Jul 7, 2022
@mroeschke mroeschke removed this from the Contributions Welcome milestone Oct 13, 2022
@phofl
Copy link
Member

phofl commented Dec 9, 2022

Closing as duplicate, this seems to be caused by running the tests on more than one core

@phofl phofl closed this as completed Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Closing Candidate May be closeable, needs more eyeballs Duplicate Report Duplicate issue or pull request Linux Linux OS metadata _metadata, .attrs Testing pandas testing functions or related to the test suite
Projects
None yet
Development

No branches or pull requests

4 participants