51 lines
1.4 KiB
Diff
51 lines
1.4 KiB
Diff
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
|
|
|