This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgpkg: python-sure 2.0.0-5; polishing
* Move away from python-mock [1] with a patch based on upstream one [2] * Move away from `python setup.py test` [3] as well as switching from nosetests to pytest, which is supported since 2.0.0 [4]. This allows dropping python-rednose from checkdepends but python-nose is still needed [5] * Mention myself as a maintainer [1] https://archlinux.org/todo/drop-python-mock-checkdepends/ [2] gabrielfalcao/sure#161 [3] https://archlinux.org/todo/stop-using-python-setuppy-test/ [4] gabrielfalcao/sure#175 [5] gabrielfalcao/sure#182 git-svn-id: file:///srv/repos/svn-community/svn@1349110 9fca08f4-af9d-4005-b8df-a31f2cc04f65
- Loading branch information
yan12125
committed
Nov 16, 2022
1 parent
c6097a3
commit 653a6f2
Showing
2 changed files
with
57 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
diff --git a/setup.py b/setup.py | ||
index 016a14b..b208b3d 100755 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -81,7 +81,7 @@ def read_readme(): | ||
return __doc__ | ||
|
||
|
||
-install_requires = ["mock", "six"] | ||
+install_requires = ["six"] | ||
tests_require = ["nose"] | ||
version = read_version() | ||
|
||
diff --git a/sure/core.py b/sure/core.py | ||
index da59e7c..76e9c9e 100644 | ||
--- a/sure/core.py | ||
+++ b/sure/core.py | ||
@@ -21,7 +21,10 @@ import os | ||
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 ( | ||
diff --git a/tests/test_assertion_builder.py b/tests/test_assertion_builder.py | ||
index 9ce637f..6e33aa8 100644 | ||
--- a/tests/test_assertion_builder.py | ||
+++ b/tests/test_assertion_builder.py | ||
@@ -17,7 +17,7 @@ | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
from __future__ import unicode_literals | ||
import re | ||
-import mock | ||
+from unittest import mock | ||
from collections import OrderedDict | ||
|
||
from datetime import datetime, timedelta |