summaryrefslogtreecommitdiff
path: root/dev-python/rapidfuzz/files/rapidfuzz-2.9.0-test-pandas.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-18 17:20:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-18 17:20:12 +0100
commit1b295861f983d29f9bd5d5906c7ca3cee4cf1f9a (patch)
tree1e7c76ef2f11271cde321f54bcd340b6e30afdd0 /dev-python/rapidfuzz/files/rapidfuzz-2.9.0-test-pandas.patch
parent5142c1d68ca78d43985ab47bc3ae7c19954a9945 (diff)
gentoo auto-resync : 18:09:2022 - 17:20:12
Diffstat (limited to 'dev-python/rapidfuzz/files/rapidfuzz-2.9.0-test-pandas.patch')
-rw-r--r--dev-python/rapidfuzz/files/rapidfuzz-2.9.0-test-pandas.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/dev-python/rapidfuzz/files/rapidfuzz-2.9.0-test-pandas.patch b/dev-python/rapidfuzz/files/rapidfuzz-2.9.0-test-pandas.patch
new file mode 100644
index 000000000000..fa73c8f3ef3b
--- /dev/null
+++ b/dev-python/rapidfuzz/files/rapidfuzz-2.9.0-test-pandas.patch
@@ -0,0 +1,35 @@
+From 1df09fb54c466efddfc62ed630fddd5fb34cab3f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+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
+