Total Complexity | 5 |
Total Lines | 34 |
Duplicated Lines | 0 % |
1 | from bears.js.JSONFormatBear import JSONFormatBear |
||
8 | }""".split("\n") |
||
9 | |||
10 | |||
11 | test_file2 = """{ |
||
12 | "b": 5, |
||
13 | "a": 5 |
||
14 | }""".split("\n") |
||
15 | |||
16 | test_file3 = """{ |
||
17 | "b": 5, |
||
18 | "a": 5 |
||
19 | }""".split("\n") |
||
20 | |||
21 | |||
22 | JSONFormatBear1Test = verify_local_bear(JSONFormatBear, |
||
23 | valid_files=(test_file1, test_file2), |
||
24 | invalid_files=(test_file3, |
||
25 | [""], |
||
26 | ["random stuff"], |
||
27 | ['{"a":5,"b":5}'])) |
||
28 | |||
29 | |||
30 | JSONFormatBear2Test = verify_local_bear(JSONFormatBear, |
||
31 | valid_files=(test_file1,), |
||
32 | invalid_files=(test_file2,), |
||
33 | settings={"json_sort": "true"}) |
||
34 | |||
35 | |||
36 | JSONFormatBear3Test = verify_local_bear(JSONFormatBear, |
||
37 | valid_files=(test_file3,), |
||
38 | invalid_files=(test_file2), |
||
39 | settings={"tab_width": "3"}) |
||
40 |