Skip to content

Commit 26d27df

Browse files
nicoddemusTadaboody
authored andcommitted
Improve changelog message
1 parent 3e6f1fa commit 26d27df

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

changelog/3191.feature.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
Add warning when asserting ``None`` directly
1+
A warning is now issued when assertions are made directly against ``None``.
2+
3+
This is a common source of confusion among new users, which write::
4+
5+
assert mocked_object.assert_called_with(3, 4, 5, key='value')
6+
7+
When they should write::
8+
9+
mocked_object.assert_called_with(3, 4, 5, key='value')
10+
11+
Because the ``assert_called_with`` method of mock objects already executes an assertion.

0 commit comments

Comments
 (0)