Skip to content

Commit 93d804a

Browse files
committed
ignore runtimewarning in plotting tests
1 parent 969e0a2 commit 93d804a

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

pandas/tests/io/test_sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2226,7 +2226,7 @@ def test_api_chunksize_read(conn, request):
22262226

22272227
# reading the query in chunks with read_sql_query
22282228
if conn_name == "sqlite_buildin":
2229-
with pytest.raises(NotImplementedError, match=""):
2229+
with pytest.raises(NotImplementedError, match="^$"):
22302230
sql.read_sql_table("test_chunksize", conn, chunksize=5)
22312231
else:
22322232
res3 = DataFrame()

pandas/tests/plotting/frame/test_frame.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
mpl = pytest.importorskip("matplotlib")
5353
plt = pytest.importorskip("matplotlib.pyplot")
5454

55+
pytestmark = pytest.mark.filterwarnings(
56+
"ignore:divide by zero encountered in scalar divide:RuntimeWarning"
57+
)
58+
5559

5660
class TestDataFramePlots:
5761
@pytest.mark.slow

pandas/tests/plotting/test_series.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
from pandas.plotting._matplotlib.converter import DatetimeConverter
4141
from pandas.plotting._matplotlib.style import get_standard_colors
4242

43+
pytestmark = pytest.mark.filterwarnings(
44+
"ignore:divide by zero encountered in scalar divide:RuntimeWarning"
45+
)
46+
4347

4448
@pytest.fixture
4549
def ts():

0 commit comments

Comments
 (0)