Accepting request 701805 from home:mcepl:branches:devel:languages:python:pytest
- Add fix-test-fast.patch to avoid failing tests/test_normal.py::test_fast test on 32bit platform. OBS-URL: https://build.opensuse.org/request/show/701805 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-benchmark?expand=0&rev=9
This commit is contained in:
parent
815efe58da
commit
4f81430dff
22
fix-test-fast.patch
Normal file
22
fix-test-fast.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- a/tests/test_normal.py
|
||||
+++ b/tests/test_normal.py
|
||||
@@ -5,6 +5,7 @@ Just to make sure the plugin doesn't cho
|
||||
Yay, doctests!
|
||||
|
||||
"""
|
||||
+import platform
|
||||
import sys # noqa
|
||||
import time
|
||||
from functools import partial
|
||||
@@ -20,7 +21,10 @@ def test_fast(benchmark):
|
||||
assert result is None
|
||||
|
||||
if not benchmark.disabled:
|
||||
- assert benchmark.stats.stats.min >= 0.000001
|
||||
+ if '32' in platform.architecture()[0]:
|
||||
+ assert benchmark.stats.stats.min >= 0.0000001
|
||||
+ else:
|
||||
+ assert benchmark.stats.stats.min >= 0.000001
|
||||
|
||||
|
||||
def test_slow(benchmark):
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 9 14:49:19 CEST 2019 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add fix-test-fast.patch to avoid failing
|
||||
tests/test_normal.py::test_fast test on 32bit platform.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 28 13:13:55 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
@ -25,6 +25,7 @@ License: BSD-2-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/ionelmc/pytest-benchmark
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-benchmark/pytest-benchmark-%{version}.tar.gz
|
||||
Patch0: fix-test-fast.patch
|
||||
BuildRequires: %{python_module aspectlib}
|
||||
BuildRequires: %{python_module elasticsearch}
|
||||
BuildRequires: %{python_module freezegun}
|
||||
@ -61,6 +62,7 @@ rounds that are calibrated to the chosen timer.
|
||||
|
||||
%prep
|
||||
%setup -q -n pytest-benchmark-%{version}
|
||||
%autopatch -p1
|
||||
# skip cli tests as we use update-alternatives
|
||||
rm -f tests/test_cli.py
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user