Conditions | 4 |
Total Lines | 24 |
Lines | 0 |
Ratio | 0 % |
1 | import json |
||
25 | def test_output_file(self): |
||
26 | update_file = "" |
||
27 | noupdate_file = "" |
||
28 | with prepare_file(["#todo this is todo"], None) as (lines, filename): |
||
29 | execute_coala(coala_html.main, |
||
30 | "coala-html", |
||
31 | "-c", os.devnull, |
||
32 | "-b", "LineCountBear", |
||
33 | "-f", re.escape(filename), |
||
34 | "--nolaunch") |
||
35 | with open(self.result_file) as fp: |
||
36 | update_file = json.load(fp) |
||
37 | execute_coala(coala_html.main, |
||
38 | "coala-html", |
||
39 | "-c", os.devnull, |
||
40 | "-b", "LineCountBear", |
||
41 | "-f", re.escape(filename), |
||
42 | "-N", |
||
43 | "--nolaunch") |
||
44 | with open(self.result_file) as fp: |
||
45 | noupdate_file = json.load(fp) |
||
46 | |||
47 | self.assertEqual(update_file['results']['default'][0]['message'], |
||
48 | noupdate_file['results']['default'][0]['message']) |
||
49 |