Fix build issues with pytest 4.6.3
This commit is contained in:
parent
9c4c239c9f
commit
96dec411a3
46
fix-expectations-pytest-4.6.3.patch
Normal file
46
fix-expectations-pytest-4.6.3.patch
Normal file
@ -0,0 +1,46 @@
|
||||
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
|
@ -7,13 +7,15 @@ to worry about undoing patches at the end of a test.
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Version: 1.10.4
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Thin-wrapper around the mock package for easier use with py.test
|
||||
|
||||
License: MIT
|
||||
URL: https://pypi.python.org/pypi/pytest-mock
|
||||
Source0: https://files.pythonhosted.org/packages/source/p/pytest-mock/pytest-mock-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
# Fix tests expectations with latest pytest (4.6.3+)
|
||||
Patch0: fix-expectations-pytest-4.6.3.patch
|
||||
|
||||
%description
|
||||
%{desc}
|
||||
@ -50,6 +52,7 @@ Requires: python3-pytest >= 2.7
|
||||
%prep
|
||||
%setup -qn %{pypi_name}-%{version}
|
||||
rm -rf *.egg-info
|
||||
%patch0 -p1
|
||||
|
||||
# Correct end of line encoding for README
|
||||
sed -i 's/\r$//' README.rst
|
||||
@ -89,6 +92,9 @@ PYTHONPATH="$(pwd)" py.test-%{python3_version} test_pytest_mock.py
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jul 30 2019 Julien Enselme <jujens@jujens.eu> - 1.10.4-3
|
||||
- Fix build issues with pytest 4.6.3
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.4-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user