Skip to content

Reinstate test for Path.truediv that fails with 3.0 #1304

@Dr-Irv

Description

@Dr-Irv

Prior to #1280 , we had this test:

def test_path_div() -> None:
    # GH 682
    folder = Path.cwd()
    files = pd.Series(["a.png", "b.png"])
    if PD_LTE_23:
        # Bug in 3.0 https://github.com/pandas-dev/pandas/issues/61940
        check(assert_type(folder / files, pd.Series), pd.Series, Path)

    folders = pd.Series([folder, folder])
    check(assert_type(folders / Path("a.png"), pd.Series), pd.Series, Path)

In #1280, @cmp0xff created this:

def test_truediv_path() -> None:

The new tests in that function need to be surrounded with the if PD_LTE_23: and the comment above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions