forked from pool/python-fire
- Replace upstreamed patch:
- python-fire-no-mock.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fire?expand=0&rev=26
This commit is contained in:
@@ -1,81 +0,0 @@
|
||||
Index: fire-0.5.0/fire/core_test.py
|
||||
===================================================================
|
||||
--- fire-0.5.0.orig/fire/core_test.py
|
||||
+++ fire-0.5.0/fire/core_test.py
|
||||
@@ -22,7 +22,11 @@ from fire import core
|
||||
from fire import test_components as tc
|
||||
from fire import testutils
|
||||
from fire import trace
|
||||
-import mock
|
||||
+
|
||||
+try:
|
||||
+ import mock # python 2.x
|
||||
+except ModuleNotFoundError:
|
||||
+ from unittest import mock # python 3.x
|
||||
|
||||
import six
|
||||
|
||||
Index: fire-0.5.0/fire/fire_import_test.py
|
||||
===================================================================
|
||||
--- fire-0.5.0.orig/fire/fire_import_test.py
|
||||
+++ fire-0.5.0/fire/fire_import_test.py
|
||||
@@ -18,7 +18,10 @@ import sys
|
||||
|
||||
import fire
|
||||
from fire import testutils
|
||||
-import mock
|
||||
+try:
|
||||
+ from unittest import mock
|
||||
+except ImportError:
|
||||
+ import mock
|
||||
|
||||
|
||||
class FireImportTest(testutils.BaseTestCase):
|
||||
Index: fire-0.5.0/fire/fire_test.py
|
||||
===================================================================
|
||||
--- fire-0.5.0.orig/fire/fire_test.py
|
||||
+++ fire-0.5.0/fire/fire_test.py
|
||||
@@ -25,7 +25,10 @@ import fire
|
||||
from fire import test_components as tc
|
||||
from fire import testutils
|
||||
|
||||
-import mock
|
||||
+try:
|
||||
+ import mock # python 2.x
|
||||
+except ModuleNotFoundError:
|
||||
+ from unittest import mock # python 3.x
|
||||
import six
|
||||
|
||||
|
||||
Index: fire-0.5.0/fire/interact_test.py
|
||||
===================================================================
|
||||
--- fire-0.5.0.orig/fire/interact_test.py
|
||||
+++ fire-0.5.0/fire/interact_test.py
|
||||
@@ -21,7 +21,10 @@ from __future__ import print_function
|
||||
from fire import interact
|
||||
from fire import testutils
|
||||
|
||||
-import mock
|
||||
+try:
|
||||
+ from unittest import mock
|
||||
+except ImportError:
|
||||
+ import mock
|
||||
|
||||
|
||||
try:
|
||||
Index: fire-0.5.0/fire/testutils.py
|
||||
===================================================================
|
||||
--- fire-0.5.0.orig/fire/testutils.py
|
||||
+++ fire-0.5.0/fire/testutils.py
|
||||
@@ -27,7 +27,10 @@ import unittest
|
||||
from fire import core
|
||||
from fire import trace
|
||||
|
||||
-import mock
|
||||
+try:
|
||||
+ import mock # python 2.x
|
||||
+except ModuleNotFoundError:
|
||||
+ from unittest import mock # python 3.x
|
||||
import six
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ Thu Oct 31 14:31:28 UTC 2024 - pgajdos@suse.com
|
||||
* Lint improvements and type safety by @dbieber in #558
|
||||
* ci: expand build matrix for major OS by @Borda in #490
|
||||
* Replace Python 2 type hints with real type annotations by @dbieber in #559
|
||||
- Replace upstreamed patch:
|
||||
- python-fire-no-mock.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 7 01:05:45 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
Reference in New Issue
Block a user