filedata' is not changed by the function since the data is assigned to a local variable
()
| 106 | |
| 107 | |
| 108 | def test_combinelines_chunk_2(): |
| 109 | """'filedata' is not changed by the function since the data is assigned to a local variable""" |
| 110 | |
| 111 | reduce = ReduceTest() |
| 112 | |
| 113 | # need to have at least 11 lines ending with comma to enter chunked mode |
| 114 | filedata = [ |
| 115 | 'int i,\n', |
| 116 | 'j,\n', |
| 117 | 'k,\n', |
| 118 | 'l,\n', |
| 119 | 'm,\n', |
| 120 | 'n,\n', |
| 121 | 'o,\n', |
| 122 | 'p,\n', |
| 123 | 'q,\n', |
| 124 | 'r,\n', |
| 125 | 's,\n', |
| 126 | 't;\n' |
| 127 | ] |
| 128 | filedata_exp = filedata |
| 129 | |
| 130 | filedata2 = reduce.combinelines(filedata) |
| 131 | assert filedata == filedata_exp |
| 132 | assert filedata2 == ['int i,j,\n', |
| 133 | '', |
| 134 | 'l,\n', |
| 135 | 'm,\n', |
| 136 | 'n,\n', |
| 137 | 'o,\n', |
| 138 | 'p,\n', |
| 139 | 'q,\n', |
| 140 | 'r,\n', |
| 141 | 's,\n', |
| 142 | 't;\n', |
| 143 | ''] |
nothing calls this directly
no test coverage detected