From 4338842bfa92718f11e1fd95628394db578203fb Mon Sep 17 00:00:00 2001 From: Joe Young <80432516+jpy-git@users.noreply.github.com> Date: Wed, 30 Mar 2022 23:09:41 +0100 Subject: [PATCH] Ignore black formatting for b013 test case (#251) * Ignore black formatting for b013 test case * Ack, needed to updated expected test result lineno --- tests/b013.py | 4 ++++ tests/test_bugbear.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/b013.py b/tests/b013.py index 4b1a240..17f314f 100644 --- a/tests/b013.py +++ b/tests/b013.py @@ -11,11 +11,15 @@ # pointless use of tuple pass +# fmt: off +# Turn off black to keep brackets around +# single exception for testing purposes. try: pass except (ValueError): # not using a tuple means it's OK (if odd) pass +# fmt: on try: pass diff --git a/tests/test_bugbear.py b/tests/test_bugbear.py index 1a164e6..a974cf4 100644 --- a/tests/test_bugbear.py +++ b/tests/test_bugbear.py @@ -204,7 +204,7 @@ def test_b013(self): bbc = BugBearChecker(filename=str(filename)) errors = list(bbc.run()) expected = self.errors( - B013(10, 0, vars=("ValueError",)), B013(28, 0, vars=("re.error",)) + B013(10, 0, vars=("ValueError",)), B013(32, 0, vars=("re.error",)) ) self.assertEqual(errors, expected)