File: fix-import.patch

package info (click to toggle)
python-idna 3.11-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,980 kB
  • sloc: python: 33,603; sh: 4; makefile: 3
file content (21 lines) | stat: -rw-r--r-- 648 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Fix import
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2025-02-02

Index: python-idna/tests/test_idna_codec.py
===================================================================
--- python-idna.orig/tests/test_idna_codec.py
+++ python-idna/tests/test_idna_codec.py
@@ -11,7 +11,10 @@ CODEC_NAME = "idna2008"
 
 class IDNACodecTests(unittest.TestCase):
     def setUp(self):
-        from . import test_idna
+        try:
+            from . import test_idna
+        except ImportError:
+            from tests import test_idna
 
         self.idnatests = test_idna.IDNATests()
         self.idnatests.setUp()