mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
4ebe630652
commit
cf73c14707
@ -395,8 +395,8 @@ if __name__ == '__main__': # tests {{{
|
|||||||
# unknown to Amazon
|
# unknown to Amazon
|
||||||
{'identifiers':{'isbn': '9780307459671'},
|
{'identifiers':{'isbn': '9780307459671'},
|
||||||
'title':'Invisible Gorilla', 'authors':['Christopher Chabris']},
|
'title':'Invisible Gorilla', 'authors':['Christopher Chabris']},
|
||||||
[title_test('The Invisible Gorilla: And Other Ways Our Intuitions Deceive Us',
|
[title_test('The Invisible Gorilla',
|
||||||
exact=True), authors_test(['Christopher Chabris', 'Daniel Simons'])]
|
exact=True), authors_test(['Christopher F. Chabris', 'Daniel Simons'])]
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
@ -404,7 +404,7 @@ if __name__ == '__main__': # tests {{{
|
|||||||
{'title':'Learning Python',
|
{'title':'Learning Python',
|
||||||
'authors':['Lutz']},
|
'authors':['Lutz']},
|
||||||
[title_test('Learning Python',
|
[title_test('Learning Python',
|
||||||
exact=True), authors_test(['Mark Lutz'])
|
exact=True), authors_test(['Mark J. Lutz', 'David Ascher'])
|
||||||
]
|
]
|
||||||
|
|
||||||
),
|
),
|
||||||
|
@ -218,11 +218,11 @@ def test_identify_plugin(name, tests): # {{{
|
|||||||
'')+'-%s-cover.jpg'%sanitize_file_name2(mi.title.replace(' ',
|
'')+'-%s-cover.jpg'%sanitize_file_name2(mi.title.replace(' ',
|
||||||
'_')))
|
'_')))
|
||||||
with open(cover, 'wb') as f:
|
with open(cover, 'wb') as f:
|
||||||
f.write(cdata)
|
f.write(cdata[-1])
|
||||||
|
|
||||||
prints('Cover downloaded to:', cover)
|
prints('Cover downloaded to:', cover)
|
||||||
|
|
||||||
if len(cdata) < 10240:
|
if len(cdata[-1]) < 10240:
|
||||||
prints('Downloaded cover too small')
|
prints('Downloaded cover too small')
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user