| Conditions | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | import os |
||
| 19 | def test_line_count(self): |
||
| 20 | with prepare_file(["#fixme"], None) as (lines, filename): |
||
| 21 | bear = "LineCountBear" |
||
| 22 | retval, output = execute_coala( |
||
| 23 | coala_format.main, |
||
| 24 | "coala-format", "-c", os.devnull, |
||
| 25 | "--settings", "files=" + re.escape(filename), |
||
| 26 | "bears=" + bear) |
||
| 27 | self.assertRegex(output, |
||
| 28 | r'msg:This file has [0-9]+ lines.', |
||
| 29 | "coala-format output for line count should" |
||
| 30 | " not be empty") |
||
| 31 | self.assertEqual(retval, |
||
| 32 | 1, |
||
| 33 | "coala-format must return exitcode 1 when it " |
||
| 34 | "yields results") |
||
| 35 |