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