def test_generate_flattened_dict(): fake_results = {'fake_name0': REF_OUT, 'fake_name1': REF_OUT, 'fake_name2': REF_OUT, } header = ms.get_header(fake_results) rows = list(ms.generate_flattened_dict(header, fake_results)) nt.eq_(3, len(rows)) # one for fake_name[0-2] nt.eq_(1 + 1 + 4 * 4, len(rows[0])) # name + everything in REF_OUT
def test_generate_flattened_dict(): fake_results = {'fake_name0': REF_OUT, 'fake_name1': REF_OUT, 'fake_name2': REF_OUT, } header = ms.get_header(fake_results) rows = list(ms.generate_flattened_dict(header, fake_results)) nt.eq_(3, len(rows)) # one for fake_name[0-2] nt.eq_(1 + 1 + 4 * (4 + 3), len(rows[0])) # name + everything in REF_OUT
def test_generate_flattened_dict(): fake_results = { 'fake_name0': REF_OUT, 'fake_name1': REF_OUT, 'fake_name2': REF_OUT, } header = ms.get_header(fake_results) rows = list(ms.generate_flattened_dict(header, fake_results)) assert 3 == len(rows) # one for fake_name[0-2] assert 1 + 2 + 4 * (4 + 4) == len(rows[0]) # name + everything in REF_OUT