mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
1a7a561e48
commit
f4c054397a
@ -152,6 +152,7 @@ def test_identify(tests): # {{{
|
|||||||
times = []
|
times = []
|
||||||
|
|
||||||
for kwargs, test_funcs in tests:
|
for kwargs, test_funcs in tests:
|
||||||
|
log('')
|
||||||
log('#'*80)
|
log('#'*80)
|
||||||
log('### Running test with:', kwargs)
|
log('### Running test with:', kwargs)
|
||||||
log('#'*80)
|
log('#'*80)
|
||||||
@ -170,6 +171,8 @@ def test_identify(tests): # {{{
|
|||||||
|
|
||||||
for i, mi in enumerate(results):
|
for i, mi in enumerate(results):
|
||||||
prints('*'*30, 'Relevance:', i, '*'*30)
|
prints('*'*30, 'Relevance:', i, '*'*30)
|
||||||
|
if mi.rating:
|
||||||
|
mi.rating *= 2
|
||||||
prints(mi)
|
prints(mi)
|
||||||
prints('\nCached cover URLs :',
|
prints('\nCached cover URLs :',
|
||||||
[x[0].name for x in get_cached_cover_urls(mi)])
|
[x[0].name for x in get_cached_cover_urls(mi)])
|
||||||
@ -205,8 +208,8 @@ def test_identify(tests): # {{{
|
|||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|
||||||
def test_identify_plugin(name, tests, modify_plugin=lambda plugin:None,
|
def test_identify_plugin(name, tests, modify_plugin=lambda plugin:None, # {{{
|
||||||
fail_missing_meta=True): # {{{
|
fail_missing_meta=True):
|
||||||
'''
|
'''
|
||||||
:param name: Plugin name
|
:param name: Plugin name
|
||||||
:param tests: List of 2-tuples. Each two tuple is of the form (args,
|
:param tests: List of 2-tuples. Each two tuple is of the form (args,
|
||||||
@ -229,6 +232,7 @@ def test_identify_plugin(name, tests, modify_plugin=lambda plugin:None,
|
|||||||
|
|
||||||
times = []
|
times = []
|
||||||
for kwargs, test_funcs in tests:
|
for kwargs, test_funcs in tests:
|
||||||
|
log('')
|
||||||
log('#'*80)
|
log('#'*80)
|
||||||
log('### Running test with:', kwargs)
|
log('### Running test with:', kwargs)
|
||||||
log('#'*80)
|
log('#'*80)
|
||||||
@ -264,6 +268,8 @@ def test_identify_plugin(name, tests, modify_plugin=lambda plugin:None,
|
|||||||
|
|
||||||
for i, mi in enumerate(results):
|
for i, mi in enumerate(results):
|
||||||
prints('*'*30, 'Relevance:', i, '*'*30)
|
prints('*'*30, 'Relevance:', i, '*'*30)
|
||||||
|
if mi.rating:
|
||||||
|
mi.rating *= 2
|
||||||
prints(mi)
|
prints(mi)
|
||||||
prints('\nCached cover URL :',
|
prints('\nCached cover URL :',
|
||||||
plugin.get_cached_cover_url(mi.identifiers))
|
plugin.get_cached_cover_url(mi.identifiers))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user