nixpkgs/pkgs/development/python-modules/cairocffi/cairocffi-0.8.1-cairo-1.15.12.patch
2018-06-04 02:37:14 +00:00

25 lines
960 B
Diff

diff --git a/cairocffi/test_cairo.py b/cairocffi/test_cairo.py
index 1588349..5452910 100644
--- a/cairocffi/test_cairo.py
+++ b/cairocffi/test_cairo.py
@@ -292,7 +292,8 @@ def test_pdf_surface():
pdf_bytes = file_obj.getvalue()
assert pdf_bytes.startswith(b'%PDF')
assert b'/MediaBox [ 0 0 123 432 ]' in pdf_bytes
- assert pdf_bytes.count(b'/Type /Page\n') == 1
+ assert pdf_bytes.count(b'/Type /Pages') == 1
+ assert pdf_bytes.count(b'/Type /Page') == 2
file_obj = io.BytesIO()
surface = PDFSurface(file_obj, 1, 1)
@@ -306,7 +307,8 @@ def test_pdf_surface():
assert b'/MediaBox [ 0 0 1 1 ]' not in pdf_bytes
assert b'/MediaBox [ 0 0 12 100 ]' in pdf_bytes
assert b'/MediaBox [ 0 0 42 700 ]' in pdf_bytes
- assert pdf_bytes.count(b'/Type /Page\n') == 2
+ assert pdf_bytes.count(b'/Type /Pages') == 1
+ assert pdf_bytes.count(b'/Type /Page') == 3
def test_svg_surface():