mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
tests: fix exclusion of FreeBSD code
calibre.devices.usbms.hal was added as a FreeBSD backend, but the test exclusion only tries importing it on Linux. It does import on Linux, but what we actually care about is that it imports on FreeBSD.
This commit is contained in:
parent
c2f76f2932
commit
4761866fa3
@ -8,7 +8,7 @@ import subprocess
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
from setup import SRC, Command, islinux, ismacos, iswindows
|
||||
from setup import SRC, Command, isbsd, islinux, ismacos, iswindows
|
||||
|
||||
TEST_MODULES = frozenset('srv db polish opf css docx cfi matcher icu smartypants build misc dbcli ebooks'.split())
|
||||
|
||||
@ -50,8 +50,10 @@ class TestImports(unittest.TestCase):
|
||||
exclude_modules |= {
|
||||
'calibre.linux',
|
||||
'calibre.utils.linux_trash', 'calibre.utils.open_with.linux',
|
||||
'calibre.gui2.linux_file_dialogs', 'calibre.devices.usbms.hal',
|
||||
'calibre.gui2.linux_file_dialogs',
|
||||
}
|
||||
if not isbsd:
|
||||
exclude_modules.add('calibre.devices.usbms.hal')
|
||||
self.assertGreater(self.base_check(os.path.join(SRC, 'odf'), exclude_packages, exclude_modules), 10)
|
||||
base = os.path.join(SRC, 'calibre')
|
||||
self.assertGreater(self.base_check(base, exclude_packages, exclude_modules), 1000)
|
||||
|
Loading…
x
Reference in New Issue
Block a user