mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-10-05 16:37:47 +03:00
Fix tests with Python 3.5
This commit is contained in:
parent
c761f5338c
commit
a455dfbfcb
@ -353,7 +353,7 @@ def test_command_line_render(tmpdir):
|
||||
_run(tmpdir.join('combined.html').strpath + ' out4.png')
|
||||
assert tmpdir.join('out4.png').read_binary() == png_bytes
|
||||
|
||||
_run(path2url(tmpdir.join('combined.html')) + ' out5.png')
|
||||
_run(path2url(tmpdir.join('combined.html').strpath) + ' out5.png')
|
||||
assert tmpdir.join('out5.png').read_binary() == png_bytes
|
||||
|
||||
_run('linked.html out6.png') # test relative URLs
|
||||
|
@ -407,14 +407,14 @@ def test_document_info():
|
||||
|
||||
@assert_no_logs
|
||||
def test_embedded_files_attachments(tmpdir):
|
||||
absolute_tmp_file = tmpdir.join('some_file.txt')
|
||||
absolute_tmp_file = tmpdir.join('some_file.txt').strpath
|
||||
adata = b'12345678'
|
||||
with open(absolute_tmp_file, 'wb') as afile:
|
||||
afile.write(adata)
|
||||
absolute_url = path2url(absolute_tmp_file)
|
||||
assert absolute_url.startswith('file://')
|
||||
|
||||
relative_tmp_file = tmpdir.join('äöü.txt')
|
||||
relative_tmp_file = tmpdir.join('äöü.txt').strpath
|
||||
rdata = b'abcdefgh'
|
||||
with open(relative_tmp_file, 'wb') as rfile:
|
||||
rfile.write(rdata)
|
||||
|
Loading…
Reference in New Issue
Block a user