Esempio n. 1
0
def test_gempak():
    'Test GEMPAK colortable conversion'
    infile = StringIO('''!   wvcolor.tbl
                         0      0      0
                       255    255    255
                       ''')
    outfile = StringIO()

    # Do the conversion
    convert_gempak_table(infile, outfile)

    # Reset and grab contents
    outfile.seek(0)
    result = outfile.read()

    assert result == '(0.000000, 0.000000, 0.000000)\n(1.000000, 1.000000, 1.000000)\n'
Esempio n. 2
0
def test_gempak():
    'Test GEMPAK colortable conversion'
    infile = StringIO('''!   wvcolor.tbl
                         0      0      0
                       255    255    255
                       ''')
    outfile = StringIO()

    # Do the conversion
    convert_gempak_table(infile, outfile)

    # Reset and grab contents
    outfile.seek(0)
    result = outfile.read()

    assert result == '(0.000000, 0.000000, 0.000000)\n(1.000000, 1.000000, 1.000000)\n'