fix tests expectations with pytest4
This commit is contained in:
parent
0d34590550
commit
0eb07f384d
50
0001-fix-tests-expectations-with-pytest4.patch
Normal file
50
0001-fix-tests-expectations-with-pytest4.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
From b4d1b1166d4d9e5a9df1b1fdea73021c936891b6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: baizg1107 <preloyalwhite@163.com>
|
||||||
|
Date: Tue, 12 Jan 2021 10:25:28 +0800
|
||||||
|
Subject: [PATCH] fix tests expectations with pytest4
|
||||||
|
|
||||||
|
reference: https://github.com/nicoddemus/pytest-mock/commit/970e4b1f8cfd6bd750b4c8240efad378cbf049c2
|
||||||
|
---
|
||||||
|
test_pytest_mock.py | 2 +-
|
||||||
|
tox.ini | 8 +++++++-
|
||||||
|
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test_pytest_mock.py b/test_pytest_mock.py
|
||||||
|
index e50b5b8..45dbe3f 100644
|
||||||
|
--- a/test_pytest_mock.py
|
||||||
|
+++ b/test_pytest_mock.py
|
||||||
|
@@ -585,7 +585,7 @@ def test_detailed_introspection(testdir):
|
||||||
|
"*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 7a270b1..bc9eaa0 100644
|
||||||
|
--- a/tox.ini
|
||||||
|
+++ b/tox.ini
|
||||||
|
@@ -12,7 +12,7 @@ commands =
|
||||||
|
|
||||||
|
[testenv:norewrite]
|
||||||
|
commands =
|
||||||
|
- pytest test_pytest_mock.py --assert=plain -ra
|
||||||
|
+ pytest test_pytest_mock.py --assert=plain
|
||||||
|
|
||||||
|
[testenv:linting]
|
||||||
|
skip_install=True
|
||||||
|
@@ -23,3 +23,9 @@ deps =
|
||||||
|
commands =
|
||||||
|
py.test --flakes pytest_mock.py test_pytest_mock.py -m flakes
|
||||||
|
rst-lint CHANGELOG.rst README.rst
|
||||||
|
+
|
||||||
|
+[tool:pytest]
|
||||||
|
+addopts = -r a
|
||||||
|
+
|
||||||
|
+[flake8]
|
||||||
|
+max-line-length = 88
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
||||||
@ -1,11 +1,12 @@
|
|||||||
Name: python-pytest-mock
|
Name: python-pytest-mock
|
||||||
Version: 1.10.0
|
Version: 1.10.0
|
||||||
Release: 7
|
Release: 8
|
||||||
Summary: Thin-wrapper around the mock package for easier use with py.test
|
Summary: Thin-wrapper around the mock package for easier use with py.test
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://pypi.python.org/pypi/pytest-mock
|
URL: https://pypi.python.org/pypi/pytest-mock
|
||||||
Source0: https://files.pythonhosted.org/packages/source/p/pytest-mock/pytest-mock-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/p/pytest-mock/pytest-mock-%{version}.tar.gz
|
||||||
Patch0001: backport-tests-handle-new-output-format-with-Python-3.8.patch
|
Patch0001: backport-tests-handle-new-output-format-with-Python-3.8.patch
|
||||||
|
Patch0002: 0001-fix-tests-expectations-with-pytest4.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -51,6 +52,9 @@ PYTHONPATH="$(pwd)" py.test-%{python3_version} test_pytest_mock.py
|
|||||||
%{python3_sitelib}/__pycache__/*
|
%{python3_sitelib}/__pycache__/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 11 2021 maminjie <maminje1@huawei.com> - 1.10.0-8
|
||||||
|
- fix tests expectations with pytest4
|
||||||
|
|
||||||
* Tue Aug 11 2020 lingsheng <lingsheng@huawei.com> - 1.10.0-7
|
* Tue Aug 11 2020 lingsheng <lingsheng@huawei.com> - 1.10.0-7
|
||||||
- Remove python2-pytest-mock subpackage
|
- Remove python2-pytest-mock subpackage
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user