14
0
forked from pool/python-sure

Accepting request 974852 from home:pgajdos:python

- do not require mock for build nor runtime
- added patches
  fix https://github.com/gabrielfalcao/sure/pull/161
  + python-sure-no-mock.patch

OBS-URL: https://build.opensuse.org/request/show/974852
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sure?expand=0&rev=23
This commit is contained in:
2022-05-04 09:30:15 +00:00
committed by Git OBS Bridge
parent 59e524fdb2
commit f08ec22a6a
3 changed files with 35 additions and 3 deletions

23
python-sure-no-mock.patch Normal file
View File

@@ -0,0 +1,23 @@
--- a/sure/core.py
+++ b/sure/core.py
@@ -21,7 +21,10 @@
try:
from mock import _CallList
except ImportError:
- from mock.mock import _CallList
+ try:
+ from mock.mock import _CallList
+ except ImportError:
+ from unittest.mock import _CallList
import inspect
from six import (
@@ -40,6 +43,7 @@ class Anything(object):
def __eq__(self, _):
return True
+
anything = Anything()