1 Star 0 Fork 19

wang_yue111/python-pytest-mock

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-fix-tests-expectations-with-pytest4.patch 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
maminjie 提交于 2021-01-12 15:22 . fix tests expectations with pytest4
From b4d1b1166d4d9e5a9df1b1fdea73021c936891b6 Mon Sep 17 00:00:00 2001
From: baizg1107 <[email protected]>
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wang_yue111/python-pytest-mock.git
[email protected]:wang_yue111/python-pytest-mock.git
wang_yue111
python-pytest-mock
python-pytest-mock
master

搜索帮助