Skip to content

Commit

Permalink
tests: handle missing pandas gracefully
Browse files Browse the repository at this point in the history
Pandas is not yet ready for Python 3.11.  Use pytest.importorskip()
to skip that one regression test that requires it when it's not
available to unblock rapidfuzz on py3.11 on Gentoo.
  • Loading branch information
mgorny committed Sep 18, 2022
1 parent 25c602b commit 1df09fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import pytest

from rapidfuzz import process_py, process_cpp, fuzz
import pandas as pd


class process:
Expand Down Expand Up @@ -298,6 +297,7 @@ def testNullStrings(self):

def testIssue81(self):
# this mostly tests whether this segfaults due to incorrect ref counting
pd = pytest.importorskip("pandas")
choices = pd.Series(
["test color brightness", "test lemon", "test lavender"],
index=[67478, 67479, 67480],
Expand Down

0 comments on commit 1df09fb

Please sign in to comment.