@@ -274,7 +274,12 @@ def test_same_rollup(self, recwarn):
274
274
unflattened = list (spreadsheet_input .unflatten ())
275
275
assert unflattened == [
276
276
{'ocid' : 1 , 'id' : 2 , 'testC' :3 , 'testA' : [{'id' : 4 , 'testB' : 5 }]},
277
- {'ocid' : 6 , 'id' : 7 , 'testC' :8 , 'testA' : [{'testB' : 9 }, {'testB' : 9 }]}, # FIXME rollup without ID causes duplicates
277
+ {'ocid' : 6 , 'id' : 7 , 'testC' :8 , 'testA' : [
278
+ {'testB' : 9 }, {'testB' : 9 }
279
+ # We have duplicates here because there's no ID to merge these
280
+ # on. This is different to the old behaviour. Issue filed at
281
+ # https://github.com/OpenDataServices/flatten-tool/issues/99
282
+ ]},
278
283
]
279
284
# We expect no warnings
280
285
assert recwarn .list == []
@@ -304,7 +309,17 @@ def test_conflicting_rollup(self, recwarn):
304
309
spreadsheet_input .read_sheets ()
305
310
unflattened = list (spreadsheet_input .unflatten ())
306
311
assert unflattened == [
307
- {'ocid' : 1 , 'id' : 2 , 'testA' : [{'id' : 3 , 'testB' : 4 }]} # FIXME could be 4 or 5 in future?
312
+ {
313
+ 'ocid' : 1 ,
314
+ 'id' : 2 ,
315
+ 'testA' : [{
316
+ 'id' : 3 ,
317
+ 'testB' : 4
318
+ # We currently know that testB will be 4 because the main
319
+ # sheet is currently always parsed first, but this may change:
320
+ # https://github.com/OpenDataServices/flatten-tool/issues/96
321
+ }]
322
+ }
308
323
]
309
324
# We should have a warning about the conflict
310
325
w = recwarn .pop (UserWarning )
0 commit comments