| Total Complexity | 4 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| 1 | import subprocess |
||
| 13 | class IndentBearTest(LocalBearTestHelper): |
||
| 14 | def setUp(self): |
||
| 15 | self.section = Section('name') |
||
| 16 | self.uut = IndentBear(self.section, Queue()) |
||
| 17 | |||
| 18 | def test_valid(self): |
||
| 19 | self.assertLinesValid(self.uut, ["int main()\n", |
||
| 20 | "{\n", |
||
| 21 | " return 0;\n", |
||
| 22 | "}\n"]) |
||
| 23 | |||
| 24 | def test_valid_gnu(self): |
||
| 25 | self.section.append(Setting("indent_cli_options", "-gnu")) |
||
| 26 | self.assertLinesValid(self.uut, ["int\n", |
||
| 27 | "main ()\n", |
||
| 28 | "{\n", |
||
| 29 | " return 0;\n", |
||
| 30 | "}\n"]) |
||
| 31 | |||
| 32 | def test_invalid(self): |
||
| 33 | self.assertLinesInvalid(self.uut, ["int main() {\n", |
||
| 34 | " return 0;\n", |
||
| 35 | "}\n"]) |
||
| 36 | |||
| 50 |