This commit is contained in:
Kovid Goyal 2011-04-13 11:08:08 -06:00
parent 4ebe630652
commit cf73c14707
2 changed files with 5 additions and 5 deletions

View File

@ -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'])
] ]
), ),

View File

@ -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)