File: 0003-disable-unrar-test.patch

package info (click to toggle)
calibre 6.13.0%2Brepack-2%2Bdeb12u5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,147,768 kB
  • sloc: python: 461,364; ansic: 80,698; cpp: 18,081; javascript: 2,855; xml: 1,297; sh: 892; sql: 683; objc: 544; makefile: 71; perl: 66; sed: 6
file content (34 lines) | stat: -rw-r--r-- 1,094 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
22
23
24
25
26
27
28
29
30
31
32
33
34
From: Norbert Preining <norbert@preining.info>
Date: Thu, 26 Dec 2019 13:56:13 +0900
Subject: disable unrar test since the module is not in Debian main

Forwarded: not-needed

disable unrar test since the module is not in Debian main
---
 src/calibre/test_build.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py
index ad1e223..c30a544 100644
--- a/src/calibre/test_build.py
+++ b/src/calibre/test_build.py
@@ -24,6 +24,10 @@ from polyglot.builtins import iteritems
 is_ci = os.environ.get('CI', '').lower() == 'true'
 is_sanitized = 'libasan' in os.environ.get('LD_PRELOAD', '')
 
+try:
+    import unrardll
+except ModuleNotFoundError:
+    unrardll = None
 
 def print(*a):
     builtins.print(*a, flush=True, file=sys.__stdout__)
@@ -401,6 +405,7 @@ class BuildTest(unittest.TestCase):
         from calibre.gui2.win_file_dialogs import test
         test()
 
+    @unittest.skipUnless(unrardll, 'Module unrardll is missing')
     def test_unrar(self):
         from calibre.utils.unrar import test_basic
         test_basic()