Accepting request 855604 from home:mcepl:branches:devel:tools:scm
- We don't need to break Python 2.7 OBS-URL: https://build.opensuse.org/request/show/855604 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flaky?expand=0&rev=16
This commit is contained in:
parent
0a27e432dc
commit
1752fcd3a7
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 13 20:27:15 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- We don't need to break Python 2.7
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 11 15:14:53 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
@ -45,6 +45,9 @@ BuildArch: noarch
|
||||
BuildRequires: %{python_module flaky >= %{version}}
|
||||
BuildRequires: %{python_module genty}
|
||||
BuildRequires: %{python_module pytest}
|
||||
%if "%{python_flavor}" == "python2"
|
||||
BuildRequires: %{python_module mock}
|
||||
%endif
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
|
@ -1,11 +1,14 @@
|
||||
--- a/test/test_pytest/test_flaky_pytest_plugin.py
|
||||
+++ b/test/test_pytest/test_flaky_pytest_plugin.py
|
||||
@@ -2,7 +2,7 @@
|
||||
@@ -2,7 +2,10 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from io import StringIO
|
||||
-from mock import Mock, patch
|
||||
+from unittest.mock import Mock, patch
|
||||
+try:
|
||||
+ from unittest.mock import Mock, patch
|
||||
+except ImportError:
|
||||
+ from mock import Mock, patch
|
||||
# pylint:disable=import-error
|
||||
import pytest
|
||||
from _pytest.runner import CallInfo
|
||||
|
Loading…
Reference in New Issue
Block a user