From 8e6aa9e3e14438f7123d17882c96d771e56fe729 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 16 Jul 2018 14:53:30 +0200 Subject: [PATCH] Locally disable assignment-from-no-return for pylint 2.0 --- tests/unit/utils/test_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py index 54ea07a69..550213386 100644 --- a/tests/unit/utils/test_utils.py +++ b/tests/unit/utils/test_utils.py @@ -462,7 +462,9 @@ class TestPreventExceptions: def test_raising(self, caplog): """Test with a raising function.""" with caplog.at_level(logging.ERROR, 'misc'): + # pylint: disable=assignment-from-no-return ret = self.func_raising() + # pylint: enable=assignment-from-no-return assert ret == 42 assert len(caplog.records) == 1 expected = 'Error in test_utils.TestPreventExceptions.func_raising' @@ -487,7 +489,9 @@ class TestPreventExceptions: def test_predicate_true(self, caplog): """Test with a True predicate.""" with caplog.at_level(logging.ERROR, 'misc'): + # pylint: disable=assignment-from-no-return ret = self.func_predicate_true() + # enable: disable=assignment-from-no-return assert ret == 42 assert len(caplog.records) == 1