|
2 | 2 | import platform |
3 | 3 | import re |
4 | 4 | import sys |
| 5 | +import warnings |
5 | 6 | from contextlib import contextmanager |
6 | 7 | from typing import Any |
7 | 8 | from typing import Callable |
@@ -758,12 +759,12 @@ def test(mocker): |
758 | 759 | "*Args:", |
759 | 760 | "*assert ('fo',) == ('',)", |
760 | 761 | "*At index 0 diff: 'fo' != ''*", |
761 | | - "*Use -v to get the full diff*", |
| 762 | + "*Use -v to get more diff*", |
762 | 763 | "*Kwargs:*", |
763 | 764 | "*assert {} == {'bar': 4}*", |
764 | 765 | "*Right contains* more item*", |
765 | 766 | "*{'bar': 4}*", |
766 | | - "*Use -v to get the full diff*", |
| 767 | + "*Use -v to get more diff*", |
767 | 768 | ] |
768 | 769 | result.stdout.fnmatch_lines(expected_lines) |
769 | 770 |
|
@@ -799,12 +800,12 @@ async def test(mocker): |
799 | 800 | "*Args:", |
800 | 801 | "*assert ('fo',) == ('',)", |
801 | 802 | "*At index 0 diff: 'fo' != ''*", |
802 | | - "*Use -v to get the full diff*", |
| 803 | + "*Use -v to get more diff*", |
803 | 804 | "*Kwargs:*", |
804 | 805 | "*assert {} == {'bar': 4}*", |
805 | 806 | "*Right contains* more item*", |
806 | 807 | "*{'bar': 4}*", |
807 | | - "*Use -v to get the full diff*", |
| 808 | + "*Use -v to get more diff*", |
808 | 809 | ] |
809 | 810 | result.stdout.fnmatch_lines(expected_lines) |
810 | 811 |
|
@@ -929,7 +930,7 @@ def doIt(self): |
929 | 930 |
|
930 | 931 | a = A() |
931 | 932 |
|
932 | | - with pytest.warns(None) as warn_record: |
| 933 | + with warnings.catch_warnings(record=True) as warn_record: |
933 | 934 | with mocker.patch.context_manager(a, "doIt", return_value=True): |
934 | 935 | assert a.doIt() is True |
935 | 936 |
|
|
0 commit comments