Beispiel #1
0
def test_read_generic_sheet_custom_fields_json_no_header(tsv_sheet_generic_no_header):
    with pytest.raises(io_tsv.TSVSheetException) as e_info:
        io_tsv.read_generic_tsv_json_data(tsv_sheet_generic_no_header)
    expected = (
        'Unexpected column seen in header row of body: ncbiTaxon, '
        'ngsLibraryConcentration, testSampleConcentration, uberonCellSource')
    assert expected == str(e_info.value)
Beispiel #2
0
def test_read_generic_sheet_custom_fields_json_header(
        tsv_sheet_generic_header):
    sheet_struc = io_tsv.read_generic_tsv_json_data(tsv_sheet_generic_header)
    assert EXPECTED_GENERIC_SHEET_JSON_HEADER == json.dumps(sheet_struc,
                                                            indent='    ')
def test_read_tumor_json_no_header(tsv_sheet_generic_no_header):
    sheet_struc = io_tsv.read_generic_tsv_json_data(
        tsv_sheet_generic_no_header)
    assert EXPECTED_GENERIC_SHEET_JSON_NO_HEADER == json.dumps(sheet_struc,
                                                               indent='    ')