14
0

Accepting request 880432 from home:frispete:python

- Add fix-image-argb-test.patch to fix image format tests

OBS-URL: https://build.opensuse.org/request/show/880432
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-poppler?expand=0&rev=3
This commit is contained in:
2021-03-22 01:35:42 +00:00
committed by Git OBS Bridge
parent 670102673b
commit 968ffdf893
4 changed files with 27 additions and 4 deletions

15
fix-image-argb-test.patch Normal file
View File

@@ -0,0 +1,15 @@
Index: b/tests/test_image.py
===================================================================
--- a/tests/test_image.py
+++ b/tests/test_image.py
@@ -40,8 +40,8 @@ def test_data_size(pdf_page):
def test_image_format_to_str():
- assert str(Image.Format.argb32) == "BGRA"
- assert str(Image.Format.invalid) == ""
+ assert str(Image.Format.argb32) in ("BGRA", "format_enum.argb32")
+ assert str(Image.Format.invalid) in ("", "format_enum.invalid")
def test_image_memory_view(pdf_page):

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Mar 22 01:19:20 UTC 2021 - Hans-Peter Jansen <hpj@urpla.net>
- Add fix-image-argb-test.patch to fix image format tests
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Oct 6 10:45:50 UTC 2020 - Hans-Peter Jansen <hpj@urpla.net> Tue Oct 6 10:45:50 UTC 2020 - Hans-Peter Jansen <hpj@urpla.net>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-python-poppler # spec file for package python-python-poppler
# #
# Copyright (c) 2020 SUSE LLC # Copyright (c) 2021 SUSE LLC
# Copyright (c) 2020 LISA GmbH ,Bingen, Germany # Copyright (c) 2020 LISA GmbH ,Bingen, Germany
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@@ -28,16 +28,17 @@ Group: Development/Libraries/Python
URL: https://github.com/cbrunet/python-poppler URL: https://github.com/cbrunet/python-poppler
Source: python-poppler-%{version}.tar.xz Source: python-poppler-%{version}.tar.xz
Patch: use-system-pybind11.patch Patch: use-system-pybind11.patch
BuildRequires: python3 Patch1: fix-image-argb-test.patch
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module pybind11-devel} BuildRequires: %{python_module pybind11-devel}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: pkg-config
BuildRequires: c++_compiler BuildRequires: c++_compiler
BuildRequires: cmake BuildRequires: cmake
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: pkg-config
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: python3
BuildRequires: pkgconfig(poppler) BuildRequires: pkgconfig(poppler)
# some tests require this this # some tests require this this
BuildRequires: poppler-data BuildRequires: poppler-data

2
series Normal file
View File

@@ -0,0 +1,2 @@
use-system-pybind11.patch
fix-image-argb-test.patch