From 1df09fb54c466efddfc62ed630fddd5fb34cab3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 18 Sep 2022 15:37:39 +0200 Subject: [PATCH] tests: handle missing pandas gracefully 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. --- tests/test_process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_process.py b/tests/test_process.py index ca5afee..b786d2d 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -5,7 +5,6 @@ import unittest import pytest from rapidfuzz import process_py, process_cpp, fuzz -import pandas as pd class process: @@ -298,6 +297,7 @@ class ProcessTest(unittest.TestCase): 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], -- 2.37.3