d/patches: drop existing patches

Drop existing patches, as the changes have been included upstream.
This commit is contained in:
Diego M. Rodriguez 2021-08-31 12:23:29 +02:00
parent 36778bae00
commit fdc21bac02
No known key found for this signature in database
GPG key ID: D9CB228B6CD14B1F
3 changed files with 0 additions and 94 deletions

View file

@ -1,46 +0,0 @@
From b2683fdfc2fbd67dfc14bfc8e9d2c06530975397 Mon Sep 17 00:00:00 2001
From: Bruno Oliveira <bruno@esss.com.br>
Date: Fri, 3 May 2019 08:58:31 -0300
Subject: [PATCH] Fix tests due to new formatting in mock 3.0 and python 3.8
---
test_pytest_mock.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/test_pytest_mock.py b/test_pytest_mock.py
index 7bc38cb..562ff0c 100644
--- a/test_pytest_mock.py
+++ b/test_pytest_mock.py
@@ -10,11 +10,11 @@
# could not make some of the tests work on PyPy, patches are welcome!
skip_pypy = pytest.mark.skipif(
- platform.python_implementation() == "PyPy", reason="could not make work on pypy"
+ platform.python_implementation() == "PyPy", reason="could not make it work on pypy"
)
-# Python 3.8 changed the output formatting (bpo-35500).
-PY38 = sys.version_info >= (3, 8)
+# Python 3.8 changed the output formatting (bpo-35500), which has been ported to mock 3.0
+NEW_FORMATTING = sys.version_info >= (3, 8) or sys.version_info[0] == 2
@pytest.fixture
@@ -209,7 +209,7 @@ def test_repr_with_name(self, mocker):
def __test_failure_message(self, mocker, **kwargs):
expected_name = kwargs.get("name") or "mock"
- if PY38:
+ if NEW_FORMATTING:
msg = "expected call not found.\nExpected: {0}()\nActual: not called."
else:
msg = "Expected call: {0}()\nNot called"
@@ -620,7 +620,7 @@ def test(mocker):
"""
)
result = testdir.runpytest("-s")
- if PY38:
+ if NEW_FORMATTING:
expected_lines = [
"*AssertionError: expected call not found.",
"*Expected: mock('', bar=4)",

View file

@ -1,46 +0,0 @@
From 970e4b1f8cfd6bd750b4c8240efad378cbf049c2 Mon Sep 17 00:00:00 2001
From: Bruno Oliveira <nicoddemus@gmail.com>
Date: Mon, 1 Jul 2019 19:31:36 -0300
Subject: [PATCH] Fix tests expectations with latest pytest
Fix #149
---
test_pytest_mock.py | 2 +-
tox.ini | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/test_pytest_mock.py b/test_pytest_mock.py
index 562ff0c..cdc04fe 100644
--- a/test_pytest_mock.py
+++ b/test_pytest_mock.py
@@ -639,7 +639,7 @@ def test(mocker):
"*Use -v to get the full diff*",
"*Kwargs:*",
"*assert {} == {'bar': 4}*",
- "*Right contains more items:*",
+ "*Right contains* more item*",
"*{'bar': 4}*",
"*Use -v to get the full diff*",
]
diff --git a/tox.ini b/tox.ini
index 427b25f..98117bf 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,7 +10,7 @@ commands =
[testenv:norewrite]
commands =
- pytest test_pytest_mock.py --assert=plain -ra
+ pytest test_pytest_mock.py --assert=plain
[testenv:linting]
skipsdist = True
@@ -20,7 +20,7 @@ basepython = python3.6
commands = pre-commit run --all-files --show-diff-on-failure
[pytest]
-addopts = -ra
+addopts = -r a
[flake8]
max-line-length = 88

View file

@ -1,2 +0,0 @@
fix-new-mock.patch
fix-new-pytest.patch