| Total Complexity | 2 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| 1 | import os |
||
| 15 | @skipIf(which('perlcritic') is None, 'perlcritic is not installed') |
||
| 16 | class PerlCriticBearTest(LocalBearTestHelper): |
||
| 17 | |||
| 18 | def setUp(self): |
||
| 19 | self.section = Section("Test Section") |
||
| 20 | self.uut = PerlCriticBear(self.section, Queue()) |
||
| 21 | self.good_file = os.path.join(os.path.dirname(__file__), |
||
| 22 | "test_files", |
||
| 23 | "perlcritic_good.pl") |
||
| 24 | self.bad_file = os.path.join(os.path.dirname(__file__), |
||
| 25 | "test_files", |
||
| 26 | "perlcritic_bad.pl") |
||
| 27 | self.conf_file = os.path.join(os.path.dirname(__file__), |
||
| 28 | "test_files", |
||
| 29 | "perlcritic_config.pl") |
||
| 30 | |||
| 31 | def test_run(self): |
||
| 32 | self.assertLinesValid(self.uut, [], self.good_file) |
||
| 33 | self.assertLinesValid(self.uut, [], self.bad_file) |
||
| 34 | # self.section.append(Setting("perlcritic_config", self.conf_file)) |
||
| 39 |