Skip to content

Commit

Permalink
skip failing tests with pandas 2.1.0
Browse files Browse the repository at this point in the history
from 2a3db66
There seems to be a bug with newer versions of pandas that prevents
kwargs from being passed through the apply function (specifically
passing errors='ignore' to to_numeric in edalize/vivado_reporting.py).
  • Loading branch information
Anna Lee authored and olofk committed Nov 21, 2023
1 parent a29fdb9 commit 42ef601
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from .edalize_common import tests_dir

PANDAS_VERSION = tuple(map(int, pd.__version__.split('.')[:3]))

def check_types(s, allowed=[int, float]):
"""Check data structures use expected types
Expand Down Expand Up @@ -348,6 +349,7 @@ def picorv32_artix7_data():
return rpt


@pytest.mark.skipif(PANDAS_VERSION >= (2, 1, 0), reason="apply(...,error='ignore') ignored")
def test_picorv32_artix7_summary(picorv32_artix7_data):
"""Check all summary fields"""

Expand All @@ -367,6 +369,7 @@ def test_picorv32_artix7_summary(picorv32_artix7_data):
assert round_fmax(summary, digits=4) == expected


@pytest.mark.skipif(PANDAS_VERSION >= (2, 1, 0), reason="apply(...,error='ignore') ignored")
def test_picorv32_artix7_resources(picorv32_artix7_data):
"""Check selected resource report fields"""

Expand All @@ -383,6 +386,7 @@ def test_picorv32_artix7_resources(picorv32_artix7_data):
assert df.at["DSPs", "Available"] == 740


@pytest.mark.skipif(PANDAS_VERSION >= (2, 1, 0), reason="apply(...,error='ignore') ignored")
def test_picorv32_artix7_timing(picorv32_artix7_data):
"""Check selected timing report fields"""

Expand All @@ -409,6 +413,7 @@ def picorv32_kusp_data():
return rpt


@pytest.mark.skipif(PANDAS_VERSION >= (2, 1, 0), reason="apply(...,error='ignore') ignored")
def test_picorv32_kusp_summary(picorv32_kusp_data):
"""Check all summary fields"""

Expand All @@ -428,6 +433,7 @@ def test_picorv32_kusp_summary(picorv32_kusp_data):
assert round_fmax(summary, 4) == expected


@pytest.mark.skipif(PANDAS_VERSION >= (2, 1, 0), reason="apply(...,error='ignore') ignored")
def test_picorv32_kusp_resources(picorv32_kusp_data):
"""Check selected resource report fields"""

Expand All @@ -447,6 +453,7 @@ def test_picorv32_kusp_resources(picorv32_kusp_data):
assert list(tables["Instantiated Netlists"].columns) == ["Ref Name", "Used"]


@pytest.mark.skipif(PANDAS_VERSION >= (2, 1, 0), reason="apply(...,error='ignore') ignored")
def test_picorv32_kusp_timing(picorv32_kusp_data):
"""Check selected timing report fields"""

Expand Down Expand Up @@ -481,6 +488,7 @@ def linux_on_litex_vexriscv_arty_a7_data():
return result


@pytest.mark.skipif(PANDAS_VERSION >= (2, 1, 0), reason="apply(...,error='ignore') ignored")
def test_linux_on_litex_vexriscv_arty_a7_summary(linux_on_litex_vexriscv_arty_a7_data):

summary = linux_on_litex_vexriscv_arty_a7_data["summary"]
Expand Down Expand Up @@ -523,6 +531,7 @@ def test_linux_on_litex_vexriscv_arty_a7_summary(linux_on_litex_vexriscv_arty_a7
assert round_fmax(summary, 4) == expected


@pytest.mark.skipif(PANDAS_VERSION >= (2, 1, 0), reason="apply(...,error='ignore') ignored")
def test_linux_on_litex_vexriscv_arty_a7_resources(
linux_on_litex_vexriscv_arty_a7_data,
):
Expand All @@ -534,6 +543,7 @@ def test_linux_on_litex_vexriscv_arty_a7_resources(
assert df.loc["LUT as Distributed RAM", "Used"] == 1932


@pytest.mark.skipif(PANDAS_VERSION >= (2, 1, 0), reason="apply(...,error='ignore') ignored")
def test_linux_on_litex_vexriscv_arty_a7_timing(linux_on_litex_vexriscv_arty_a7_data):

rpt = linux_on_litex_vexriscv_arty_a7_data["timing"]
Expand Down

0 comments on commit 42ef601

Please sign in to comment.