Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-quantum-blackbird for
openSUSE:Factory checked in at 2021-05-12 19:32:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-quantum-blackbird (Old)
and /work/SRC/openSUSE:Factory/.python-quantum-blackbird.new.2988 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-quantum-blackbird"
Wed May 12 19:32:45 2021 rev:5 rq:892515 version:0.3.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-quantum-blackbird/python-quantum-blackbird.changes
2021-04-26 16:40:20.558146342 +0200
+++
/work/SRC/openSUSE:Factory/.python-quantum-blackbird.new.2988/python-quantum-blackbird.changes
2021-05-12 19:33:23.318760436 +0200
@@ -1,0 +2,6 @@
+Wed May 12 13:52:14 UTC 2021 - Matej Cepl <[email protected]>
+
+- Add skip_32bit_divide_scalar_array_test.patch to skip the
+ failing test on 32bit arch (gh#XanaduAI/blackbird#42).
+
+-------------------------------------------------------------------
New:
----
skip_32bit_divide_scalar_array_test.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-quantum-blackbird.spec ++++++
--- /var/tmp/diff_new_pack.abM72r/_old 2021-05-12 19:33:23.798758519 +0200
+++ /var/tmp/diff_new_pack.abM72r/_new 2021-05-12 19:33:23.802758502 +0200
@@ -27,6 +27,9 @@
License: Apache-2.0
URL: https://github.com/XanaduAI/blackbird
Source:
https://github.com/XanaduAI/blackbird/archive/v%{version}.tar.gz#/blackbird-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM skip_32bit_divide_scalar_array_test.patch
gh#XanaduAI/blackbird#42 [email protected]
+# Skip tests failing on 32bit
+Patch0: skip_32bit_divide_scalar_array_test.patch
BuildRequires: %{python_module antlr4-python3-runtime >= 4.8}
BuildRequires: %{python_module networkx}
BuildRequires: %{python_module numpy >= 1.16}
@@ -49,7 +52,7 @@
hardware and Strawberry Fields simulator.
%prep
-%setup -q -n blackbird-%{version}
+%autosetup -p1 -n blackbird-%{version}
%build
%python_build
++++++ skip_32bit_divide_scalar_array_test.patch ++++++
---
blackbird_python/blackbird/tests/test_auxiliary.py | 4 ++++
1 file changed, 4 insertions(+)
--- a/blackbird_python/blackbird/tests/test_auxiliary.py
+++ b/blackbird_python/blackbird/tests/test_auxiliary.py
@@ -14,6 +14,8 @@
"""Tests for the auxiliary functions"""
# pylint:
disable=too-many-ancestors,no-self-use,redefined-outer-name,too-many-arguments,no-value-for-parameter
+import sys
+
import pytest
import numpy as np
@@ -26,6 +28,7 @@ from blackbird.blackbirdParser import bl
from blackbird.auxiliary import _literal, _number, _func, _expression,
_get_arguments
from blackbird.error import BlackbirdSyntaxError
+IS32BIT = sys.maxsize <= 2**32
test_ints = [('-3', -3), ('0', 0), ('4', 4), ('15', 15)]
test_floats = [('0.432', 0.432), ('-0.54321', -0.54321), ('32.432', 32.432),
('13.', 13), ('-1', -1), ('8.0', 8), ('89.23e-10', 8.923e-9)]
@@ -596,6 +599,7 @@ class TestExpressionArray:
expr.TIMES = lambda: True
assert np.allclose(_expression(expr), U*5*np.cos(U))
+ @pytest.mark.skipif(IS32BIT, reason="gh#XanaduAI/blackbird#42")
@pytest.mark.parametrize('n1', test_complex)
def test_divide_scalar_array(self, parser, ctx, n1, num, var, monkeypatch):
"""Test division of a number and an array"""