File: 0003-disable-unrar-test.patch

package info (click to toggle)
calibre 8.16.2%2Bds%2B~0.10.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 446,080 kB
  • sloc: python: 456,775; cpp: 151,500; ansic: 85,816; javascript: 57,787; xml: 1,247; sh: 957; sql: 735; objc: 330; makefile: 77; sed: 3
file content (34 lines) | stat: -rw-r--r-- 1,104 bytes parent folder | download | duplicates (5)
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 b5f3eb7..cc2851f 100644
--- a/src/calibre/test_build.py
+++ b/src/calibre/test_build.py
@@ -24,6 +24,10 @@ from calibre.utils.resources import get_path as P
 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__)
@@ -471,6 +475,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()