1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 08:27:22 +03:00

Fix tests with Python 3.5

This commit is contained in:
Guillaume Ayoub 2018-03-20 00:05:11 +01:00
parent c761f5338c
commit a455dfbfcb
2 changed files with 3 additions and 3 deletions

View File

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

View File

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