Fix polish test: now need option to allow local files from outside root when building the test book

This commit is contained in:
Kovid Goyal 2023-05-28 15:47:46 +05:30
parent 9ec1f0820a
commit 7444f22e49
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -70,7 +70,7 @@ def get_simple_book(fmt='epub'):
with open(x, 'wb') as f:
f.write(raw.encode('utf-8'))
build_book(x, ans, args=[
'--level1-toc=//h:h2', '--language=en', '--authors=Kovid Goyal', '--cover=lt.png'])
'--level1-toc=//h:h2', '--language=en', '--authors=Kovid Goyal', '--cover=lt.png', '--allow-local-files-outside-root'])
return ans
@ -85,7 +85,7 @@ def get_split_book(fmt='epub'):
with open(x, 'wb') as f:
f.write(raw.encode('utf-8'))
build_book(x, ans, args=['--level1-toc=//h:h2', '--language=en', '--authors=Kovid Goyal',
'--cover=' + I('lt.png')])
'--cover=' + I('lt.png'), '--allow-local-files-outside-root'])
finally:
os.remove(x)
return ans