Skip to content

Commit a517447

Browse files
authored
Merge pull request #283 from pytest-dev/pre-commit-ci-update-config
2 parents 7fbf14e + 0577f1a commit a517447

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ repos:
1919
language: python
2020
additional_dependencies: [pygments, restructuredtext_lint]
2121
- repo: https://github.com/asottile/reorder_python_imports
22-
rev: v2.7.1
22+
rev: v3.0.1
2323
hooks:
2424
- id: reorder-python-imports
2525
args: ['--application-directories=.:src']
2626
- repo: https://github.com/pre-commit/mirrors-mypy
27-
rev: v0.931 # NOTE: keep this in sync with tox.ini
27+
rev: v0.940 # NOTE: keep this in sync with tox.ini
2828
hooks:
2929
- id: mypy
3030
files: ^(src|tests)

tests/test_pytest_mock.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import platform
33
import re
44
import sys
5+
import warnings
56
from contextlib import contextmanager
67
from typing import Any
78
from typing import Callable
@@ -758,12 +759,12 @@ def test(mocker):
758759
"*Args:",
759760
"*assert ('fo',) == ('',)",
760761
"*At index 0 diff: 'fo' != ''*",
761-
"*Use -v to get the full diff*",
762+
"*Use -v to get more diff*",
762763
"*Kwargs:*",
763764
"*assert {} == {'bar': 4}*",
764765
"*Right contains* more item*",
765766
"*{'bar': 4}*",
766-
"*Use -v to get the full diff*",
767+
"*Use -v to get more diff*",
767768
]
768769
result.stdout.fnmatch_lines(expected_lines)
769770

@@ -799,12 +800,12 @@ async def test(mocker):
799800
"*Args:",
800801
"*assert ('fo',) == ('',)",
801802
"*At index 0 diff: 'fo' != ''*",
802-
"*Use -v to get the full diff*",
803+
"*Use -v to get more diff*",
803804
"*Kwargs:*",
804805
"*assert {} == {'bar': 4}*",
805806
"*Right contains* more item*",
806807
"*{'bar': 4}*",
807-
"*Use -v to get the full diff*",
808+
"*Use -v to get more diff*",
808809
]
809810
result.stdout.fnmatch_lines(expected_lines)
810811

@@ -929,7 +930,7 @@ def doIt(self):
929930

930931
a = A()
931932

932-
with pytest.warns(None) as warn_record:
933+
with warnings.catch_warnings(record=True) as warn_record:
933934
with mocker.patch.context_manager(a, "doIt", return_value=True):
934935
assert a.doIt() is True
935936

0 commit comments

Comments
 (0)