mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
dev-python/pyrqlite: Elminate non-public test.support usage
Closes: https://bugs.gentoo.org/940579 Signed-off-by: Zac Medico <zmedico@gentoo.org>
This commit is contained in:
50
dev-python/pyrqlite/files/pyrqlite-2.2.3-test-support.patch
Normal file
50
dev-python/pyrqlite/files/pyrqlite-2.2.3-test-support.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
From cb5ba83c0ba95eae0026afdc8ae0312b8e51f647 Mon Sep 17 00:00:00 2001
|
||||
From: Zac Medico <zmedico@gmail.com>
|
||||
Date: Wed, 2 Oct 2024 16:48:38 -0700
|
||||
Subject: [PATCH] Eliminate non-public test.support usage
|
||||
|
||||
This fixes the "No module named test" issue reported here:
|
||||
|
||||
https://bugs.gentoo.org/940579
|
||||
---
|
||||
src/test/test_dbapi.py | 17 ++++++-----------
|
||||
1 file changed, 6 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/test/test_dbapi.py b/src/test/test_dbapi.py
|
||||
index df32f2f..cb756d2 100644
|
||||
--- a/src/test/test_dbapi.py
|
||||
+++ b/src/test/test_dbapi.py
|
||||
@@ -24,13 +24,6 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
-try:
|
||||
- import test.support.warnings_helper as test_support
|
||||
-except ImportError:
|
||||
- try:
|
||||
- import test.support as test_support
|
||||
- except ImportError:
|
||||
- from test import test_support
|
||||
import unittest
|
||||
|
||||
import pyrqlite.dbapi2 as sqlite
|
||||
@@ -571,10 +564,12 @@ class ConstructorTests(unittest.TestCase):
|
||||
ts = sqlite.TimestampFromTicks(42)
|
||||
|
||||
def test_CheckBinary(self):
|
||||
- with (test_support.check_warnings() if sys.version_info[0] >= 3
|
||||
- else test_support.check_py3k_warnings()):
|
||||
- b = sqlite.Binary(chr(0).encode() + b"'"
|
||||
- if sys.version_info[0] >= 3 else chr(0) + b"'")
|
||||
+ self.assertEqual(
|
||||
+ b"\0'",
|
||||
+ sqlite.Binary(
|
||||
+ chr(0).encode() + b"'" if sys.version_info[0] >= 3 else chr(0) + b"'"
|
||||
+ ),
|
||||
+ )
|
||||
|
||||
class ExtensionTests(unittest.TestCase):
|
||||
@classmethod
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -26,5 +26,6 @@ BDEPEND="
|
||||
>=dev-db/rqlite-6.7.0
|
||||
)
|
||||
"
|
||||
PATCHES=("${FILESDIR}/pyrqlite-2.2.3-test-support.patch")
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
Reference in New Issue
Block a user