mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
188ae48b72
commit
e71acfc4d5
@ -76,7 +76,7 @@ class Push(Command):
|
|||||||
r'Owner@winxp:/cygdrive/c/Documents\ and\ Settings/Owner/calibre':'winxp',
|
r'Owner@winxp:/cygdrive/c/Documents\ and\ Settings/Owner/calibre':'winxp',
|
||||||
'kovid@ox:calibre':None,
|
'kovid@ox:calibre':None,
|
||||||
r'kovid@win7:/cygdrive/c/Users/kovid/calibre':'Windows 7',
|
r'kovid@win7:/cygdrive/c/Users/kovid/calibre':'Windows 7',
|
||||||
'kovid@win7-x64:calibre-src':'win7-x64',
|
'kovid@win7-x64:calibre':'win7-x64',
|
||||||
'kovid@tiny:calibre':None,
|
'kovid@tiny:calibre':None,
|
||||||
'kovid@getafix:calibre-src':None,
|
'kovid@getafix:calibre-src':None,
|
||||||
}.iteritems():
|
}.iteritems():
|
||||||
|
@ -43,7 +43,7 @@ def test_plugins():
|
|||||||
if err or not mod:
|
if err or not mod:
|
||||||
raise RuntimeError('Plugin %s failed to load with error: %s' %
|
raise RuntimeError('Plugin %s failed to load with error: %s' %
|
||||||
(name, err))
|
(name, err))
|
||||||
print (mod, 'loaded')
|
print ('Loaded all plugins successfully!')
|
||||||
|
|
||||||
def test_lxml():
|
def test_lxml():
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
@ -56,7 +56,13 @@ def test_lxml():
|
|||||||
|
|
||||||
def test_winutil():
|
def test_winutil():
|
||||||
from calibre.devices.scanner import win_pnp_drives
|
from calibre.devices.scanner import win_pnp_drives
|
||||||
matches = win_pnp_drives.scanner()
|
from calibre.constants import plugins
|
||||||
|
winutil = plugins['winutil'][0]
|
||||||
|
try:
|
||||||
|
matches = win_pnp_drives.scanner()
|
||||||
|
except winutil.DriveError:
|
||||||
|
print ('No removable drives found, skipping win_pnp_drives test!')
|
||||||
|
return
|
||||||
if len(matches) < 1:
|
if len(matches) < 1:
|
||||||
raise RuntimeError('win_pnp_drives returned no drives')
|
raise RuntimeError('win_pnp_drives returned no drives')
|
||||||
print ('win_pnp_drives OK!')
|
print ('win_pnp_drives OK!')
|
||||||
@ -140,6 +146,7 @@ def test_wpd():
|
|||||||
print ('This computer does not have WPD')
|
print ('This computer does not have WPD')
|
||||||
else:
|
else:
|
||||||
wpd.uninit()
|
wpd.uninit()
|
||||||
|
print ('WPD OK!')
|
||||||
|
|
||||||
def test_woff():
|
def test_woff():
|
||||||
from calibre.utils.fonts.woff import test
|
from calibre.utils.fonts.woff import test
|
||||||
@ -147,7 +154,6 @@ def test_woff():
|
|||||||
print ('WOFF ok!')
|
print ('WOFF ok!')
|
||||||
|
|
||||||
def test_magick():
|
def test_magick():
|
||||||
print ('Testing tinycss tokenizer')
|
|
||||||
from calibre.utils.magick import create_canvas
|
from calibre.utils.magick import create_canvas
|
||||||
i = create_canvas(100, 100)
|
i = create_canvas(100, 100)
|
||||||
from calibre.gui2.tweak_book.editor.canvas import qimage_to_magick, magick_to_qimage
|
from calibre.gui2.tweak_book.editor.canvas import qimage_to_magick, magick_to_qimage
|
||||||
@ -156,6 +162,7 @@ def test_magick():
|
|||||||
print ('magick OK!')
|
print ('magick OK!')
|
||||||
|
|
||||||
def test_tokenizer():
|
def test_tokenizer():
|
||||||
|
print ('Testing tinycss tokenizer')
|
||||||
from tinycss.tokenizer import c_tokenize_flat
|
from tinycss.tokenizer import c_tokenize_flat
|
||||||
if c_tokenize_flat is None:
|
if c_tokenize_flat is None:
|
||||||
raise ValueError('tinycss C tokenizer not loaded')
|
raise ValueError('tinycss C tokenizer not loaded')
|
||||||
@ -197,8 +204,8 @@ def test():
|
|||||||
test_psutil()
|
test_psutil()
|
||||||
test_podofo()
|
test_podofo()
|
||||||
if iswindows:
|
if iswindows:
|
||||||
test_winutil()
|
|
||||||
test_wpd()
|
test_wpd()
|
||||||
|
test_winutil()
|
||||||
if islinux:
|
if islinux:
|
||||||
test_dbus()
|
test_dbus()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user