Beispiel #1
0
 def test_b001(self):
     filename = Path(__file__).absolute().parent / 'b001.py'
     bbc = BugBearChecker(filename=str(filename))
     errors = list(bbc.run())
     self.assertEqual(
         errors,
         self.errors(B001(8, 0), B001(40, 4)),
     )
Beispiel #2
0
 def test_b001(self):
     filename = Path(__file__).absolute().parent / "b001.py"
     bbc = BugBearChecker(filename=str(filename))
     errors = list(bbc.run())
     expected = self.errors(
         B001(8, 0, vars=("bare `except:`", )),
         B001(40, 4, vars=("bare `except:`", )),
         B001(47, 0, vars=("`except ():`", )),
     )
     self.assertEqual(errors, expected)