From 6db9f4685a310f1ae65e35afacd977d2ed8fb01d Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Mon, 4 Jun 2018 02:35:39 +0000 Subject: [PATCH] python.pkgs.cairocffi: update tests for Cairo 1.15.12 Fixes #41183 --- .../cairocffi-0.8.1-cairo-1.15.12.patch | 24 +++++++++++++++++++ .../python-modules/cairocffi/default.nix | 1 + 2 files changed, 25 insertions(+) create mode 100644 pkgs/development/python-modules/cairocffi/cairocffi-0.8.1-cairo-1.15.12.patch diff --git a/pkgs/development/python-modules/cairocffi/cairocffi-0.8.1-cairo-1.15.12.patch b/pkgs/development/python-modules/cairocffi/cairocffi-0.8.1-cairo-1.15.12.patch new file mode 100644 index 000000000000..4d142275b9e8 --- /dev/null +++ b/pkgs/development/python-modules/cairocffi/cairocffi-0.8.1-cairo-1.15.12.patch @@ -0,0 +1,24 @@ +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(): diff --git a/pkgs/development/python-modules/cairocffi/default.nix b/pkgs/development/python-modules/cairocffi/default.nix index dbc747399b44..a9c4a3437b58 100644 --- a/pkgs/development/python-modules/cairocffi/default.nix +++ b/pkgs/development/python-modules/cairocffi/default.nix @@ -47,6 +47,7 @@ buildPythonPackage rec { gdk_pixbuf = gdk_pixbuf.out; }) ./fix_test_scaled_font.patch + ./cairocffi-0.8.1-cairo-1.15.12.patch ]; meta = with lib; {