Locally disable assignment-from-no-return for pylint 2.0
This commit is contained in:
parent
2d65f25a04
commit
8e6aa9e3e1
@ -462,7 +462,9 @@ class TestPreventExceptions:
|
|||||||
def test_raising(self, caplog):
|
def test_raising(self, caplog):
|
||||||
"""Test with a raising function."""
|
"""Test with a raising function."""
|
||||||
with caplog.at_level(logging.ERROR, 'misc'):
|
with caplog.at_level(logging.ERROR, 'misc'):
|
||||||
|
# pylint: disable=assignment-from-no-return
|
||||||
ret = self.func_raising()
|
ret = self.func_raising()
|
||||||
|
# pylint: enable=assignment-from-no-return
|
||||||
assert ret == 42
|
assert ret == 42
|
||||||
assert len(caplog.records) == 1
|
assert len(caplog.records) == 1
|
||||||
expected = 'Error in test_utils.TestPreventExceptions.func_raising'
|
expected = 'Error in test_utils.TestPreventExceptions.func_raising'
|
||||||
@ -487,7 +489,9 @@ class TestPreventExceptions:
|
|||||||
def test_predicate_true(self, caplog):
|
def test_predicate_true(self, caplog):
|
||||||
"""Test with a True predicate."""
|
"""Test with a True predicate."""
|
||||||
with caplog.at_level(logging.ERROR, 'misc'):
|
with caplog.at_level(logging.ERROR, 'misc'):
|
||||||
|
# pylint: disable=assignment-from-no-return
|
||||||
ret = self.func_predicate_true()
|
ret = self.func_predicate_true()
|
||||||
|
# enable: disable=assignment-from-no-return
|
||||||
assert ret == 42
|
assert ret == 42
|
||||||
assert len(caplog.records) == 1
|
assert len(caplog.records) == 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user