File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 66
66
* Add ``build/ `` and ``dist/ `` to the default ``--norecursedirs `` list. Thanks
67
67
`@mikofski `_ for the report and `@tomviner `_ for the PR (`#1544 `_).
68
68
69
- * pytest.raises accepts a custom message to raise when no exception accord .
70
- Thanks `@palaviv `_ for the PR .
69
+ * pytest.raises accepts a custom message to raise when no exception occurred .
70
+ Thanks `@palaviv `_ for the complete PR (` #1616 `_) .
71
71
72
72
.. _@milliams : https://github.com/milliams
73
73
.. _@csaftoiu : https://github.com/csaftoiu
92
92
.. _#1520 : https://github.com/pytest-dev/pytest/pull/1520
93
93
.. _#372 : https://github.com/pytest-dev/pytest/issues/372
94
94
.. _#1544 : https://github.com/pytest-dev/pytest/issues/1544
95
+ .. _#1616 : https://github.com/pytest-dev/pytest/pull/1616
95
96
96
97
97
98
**Bug Fixes **
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ def test_no_raise_message(self):
80
80
with pytest .raises (ValueError ):
81
81
pass
82
82
except pytest .raises .Exception as e :
83
- e .msg == "DID NOT RAISE {0}" .format (repr (ValueError ))
83
+ assert e .msg == "DID NOT RAISE {0}" .format (repr (ValueError ))
84
84
85
85
def test_costum_raise_message (self ):
86
86
message = "TEST_MESSAGE"
@@ -92,4 +92,4 @@ def test_costum_raise_message(self):
92
92
with pytest .raises (ValueError , message = message ):
93
93
pass
94
94
except pytest .raises .Exception as e :
95
- e .msg == message
95
+ assert e .msg == message
You can’t perform that action at this time.
0 commit comments