SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
42
devel/py-deprecation/patches/patch-tests_test_deprecation_py
Normal file
42
devel/py-deprecation/patches/patch-tests_test_deprecation_py
Normal file
|
@ -0,0 +1,42 @@
|
|||
This port is python3 only, we do not need unittest2
|
||||
|
||||
Index: tests/test_deprecation.py
|
||||
--- tests/test_deprecation.py.orig
|
||||
+++ tests/test_deprecation.py
|
||||
@@ -10,16 +10,14 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
-# As we unfortunately support Python 2.7, it lacks TestCase.subTest which
|
||||
-# is in 3.4+ or in unittest2
|
||||
-import unittest2
|
||||
+import unittest
|
||||
import warnings
|
||||
|
||||
import deprecation
|
||||
from datetime import date
|
||||
|
||||
|
||||
-class Test_deprecated(unittest2.TestCase):
|
||||
+class Test_deprecated(unittest.TestCase):
|
||||
|
||||
def test_args_set_on_base_class(self):
|
||||
args = (1, 2, 3, 4)
|
||||
@@ -230,7 +228,7 @@ class Test_deprecated(unittest2.TestCase):
|
||||
self.assertEqual(sot.method(), ret_val)
|
||||
|
||||
|
||||
-class Test_fail_if_not_removed(unittest2.TestCase):
|
||||
+class Test_fail_if_not_removed(unittest.TestCase):
|
||||
|
||||
@deprecation.deprecated(deprecated_in="1.0", current_version="2.0")
|
||||
def _deprecated_method(self):
|
||||
@@ -259,7 +257,7 @@ class Test_fail_if_not_removed(unittest2.TestCase):
|
||||
except AssertionError:
|
||||
self.fail("A DeprecatedWarning shouldn't cause a failure")
|
||||
|
||||
- @unittest2.expectedFailure
|
||||
+ @unittest.expectedFailure
|
||||
@deprecation.fail_if_not_removed
|
||||
def test_literal_UnsupportedWarning(self):
|
||||
self._unsupported_method()
|
Loading…
Add table
Add a link
Reference in a new issue