CR fixes
This commit is contained in:
parent
8ddbca36c9
commit
e6ff01ada3
|
@ -66,8 +66,8 @@
|
||||||
* Add ``build/`` and ``dist/`` to the default ``--norecursedirs`` list. Thanks
|
* Add ``build/`` and ``dist/`` to the default ``--norecursedirs`` list. Thanks
|
||||||
`@mikofski`_ for the report and `@tomviner`_ for the PR (`#1544`_).
|
`@mikofski`_ for the report and `@tomviner`_ for the PR (`#1544`_).
|
||||||
|
|
||||||
* pytest.raises accepts a custom message to raise when no exception accord.
|
* pytest.raises accepts a custom message to raise when no exception occurred.
|
||||||
Thanks `@palaviv`_ for the PR.
|
Thanks `@palaviv`_ for the complete PR (`#1616`_).
|
||||||
|
|
||||||
.. _@milliams: https://github.com/milliams
|
.. _@milliams: https://github.com/milliams
|
||||||
.. _@csaftoiu: https://github.com/csaftoiu
|
.. _@csaftoiu: https://github.com/csaftoiu
|
||||||
|
@ -92,6 +92,7 @@
|
||||||
.. _#1520: https://github.com/pytest-dev/pytest/pull/1520
|
.. _#1520: https://github.com/pytest-dev/pytest/pull/1520
|
||||||
.. _#372: https://github.com/pytest-dev/pytest/issues/372
|
.. _#372: https://github.com/pytest-dev/pytest/issues/372
|
||||||
.. _#1544: https://github.com/pytest-dev/pytest/issues/1544
|
.. _#1544: https://github.com/pytest-dev/pytest/issues/1544
|
||||||
|
.. _#1616: https://github.com/pytest-dev/pytest/pull/1616
|
||||||
|
|
||||||
|
|
||||||
**Bug Fixes**
|
**Bug Fixes**
|
||||||
|
|
|
@ -80,7 +80,7 @@ class TestRaises:
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
pass
|
pass
|
||||||
except pytest.raises.Exception as e:
|
except pytest.raises.Exception as e:
|
||||||
e.msg == "DID NOT RAISE {0}".format(repr(ValueError))
|
assert e.msg == "DID NOT RAISE {0}".format(repr(ValueError))
|
||||||
|
|
||||||
def test_costum_raise_message(self):
|
def test_costum_raise_message(self):
|
||||||
message = "TEST_MESSAGE"
|
message = "TEST_MESSAGE"
|
||||||
|
@ -92,4 +92,4 @@ class TestRaises:
|
||||||
with pytest.raises(ValueError, message=message):
|
with pytest.raises(ValueError, message=message):
|
||||||
pass
|
pass
|
||||||
except pytest.raises.Exception as e:
|
except pytest.raises.Exception as e:
|
||||||
e.msg == message
|
assert e.msg == message
|
||||||
|
|
Loading…
Reference in New Issue