| Total Complexity | 1 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import ssg.yaml |
||
| 2 | |||
| 3 | |||
| 4 | def test_list_or_string_update(): |
||
| 5 | assert ssg.yaml.update_yaml_list_or_string( |
||
| 6 | "", |
||
| 7 | "", |
||
| 8 | ) == "" |
||
| 9 | |||
| 10 | assert ssg.yaml.update_yaml_list_or_string( |
||
| 11 | "something", |
||
| 12 | "", |
||
| 13 | ) == "something" |
||
| 14 | |||
| 15 | assert ssg.yaml.update_yaml_list_or_string( |
||
| 16 | ["something"], |
||
| 17 | "", |
||
| 18 | ) == "something" |
||
| 19 | |||
| 20 | assert ssg.yaml.update_yaml_list_or_string( |
||
| 21 | "", |
||
| 22 | "else", |
||
| 23 | ) == "else" |
||
| 24 | |||
| 25 | assert ssg.yaml.update_yaml_list_or_string( |
||
| 26 | "something", |
||
| 27 | "else", |
||
| 28 | ) == ["something", "else"] |
||
| 29 | |||
| 30 | assert ssg.yaml.update_yaml_list_or_string( |
||
| 31 | "", |
||
| 32 | ["something", "else"], |
||
| 33 | ) == ["something", "else"] |
||
| 34 | |||
| 35 | assert ssg.yaml.update_yaml_list_or_string( |
||
| 36 | ["something", "else"], |
||
| 37 | "", |
||
| 38 | ) == ["something", "else"] |
||
| 39 | |||
| 40 | assert ssg.yaml.update_yaml_list_or_string( |
||
| 41 | "something", |
||
| 42 | ["entirely", "else"], |
||
| 43 | ) == ["something", "entirely", "else"] |
||
| 44 | |||
| 45 | assert ssg.yaml.update_yaml_list_or_string( |
||
| 46 | ["something", "entirely"], |
||
| 47 | ["entirely", "else"], |
||
| 48 | ) == ["something", "entirely", "entirely", "else"] |
||
| 49 |