Esempio n. 1
0
def test6Fn():
    tempProf = InputProfile(tColorTableDefault, [defaultOceanColor])
    precProf = InputProfile(pColorTableDefault, [defaultOceanColor])
    outProf = OutputProfile(kColorTableDefault, defaultOceanColor, defaultUnknownColor)

    outputPath = getTestDirPath('test6-out.png')
    tempnsPath, tempnwPath, precnsPath, precnwPath = getProfiaInputsBadPixel()

    correctError = False
    try:
        buildOutput(tempnsPath, tempnwPath, precnsPath, precnwPath, tempProf, precProf, outProf)
    except SKCCError as e:
        if (str(e) == 'Invalid color in input data (did not match input profile): (255, 0, 0)'):
            correctError = True
        else:
            raise
    return correctError
Esempio n. 2
0
def test3Fn():
    tempProf = InputProfile(tColorTableDefault, [defaultOceanColor])
    precProf = InputProfile(pColorTableDefault, [defaultOceanColor])
    outProf = readAndValidateKoppenOutputProfile(getParentDirPath('defaultOutputProfile'))

    outputPath = getTestDirPath('test3-out.png')
    tempnsPath, tempnwPath, precnsPath, precnwPath = getBoxesInputs()

    comparePath = getTestDirPath('BoxesOutputDefault.png')

    outputToFile(outputPath, buildOutput(tempnsPath, tempnwPath, precnsPath, precnwPath, tempProf, precProf, outProf))
                                
    return compareImages(outputPath, comparePath)
Esempio n. 3
0
def test1Fn():
    tempProf = InputProfile(tColorTableDefault, [defaultOceanColor])
    precProf = InputProfile(pColorTableDefault, [defaultOceanColor])
    outProf = OutputProfile(kColorTableDefault, defaultOceanColor, defaultUnknownColor)

    outputPath = getTestDirPath('test1-out.png')
    tempnsPath, tempnwPath, precnsPath, precnwPath = getProfiaInputs()

    comparePath = getTestDirPath('ProfiaOutputDefault.png')

    outputToFile(outputPath, buildOutput(tempnsPath, tempnwPath, precnsPath, precnwPath, tempProf, precProf, outProf))

    return compareImages(outputPath, comparePath)
Esempio n. 4
0
def test14Fn():
    tempProf = InputProfile(tColorTableDefault, [defaultOceanColor])
    precProf = InputProfile(pColorTableDefault, [defaultOceanColor])
    outProf = readOutputProfile(getTestDirPath('testCustomColorOceanOutputProfile2'))

    outputPath = getTestDirPath('test14-out.png')
    tempnsPath, tempnwPath, precnsPath, precnwPath = getProfiaInputs()

    comparePath = getTestDirPath('ProfiaCustomOceanOutput.png')

    outputToFile(outputPath, buildOutput(tempnsPath, tempnwPath, precnsPath, precnwPath, tempProf, precProf, outProf))

    return compareImages(outputPath, comparePath)
Esempio n. 5
0
def test9Fn():
    tempProf = InputProfile(tColorTableDefault, [defaultOceanColor])
    precProf = readInputProfile(getParentDirPath('altPrecProfile'))
    outProf = OutputProfile(kColorTableDefault, defaultOceanColor, defaultUnknownColor)

    outputPath = getTestDirPath('test9-out.png')
    tempnsPath, tempnwPath, precnsPath, precnwPath = getBallInputs()

    comparePath = getTestDirPath('BallOutput.png')

    outputToFile(outputPath, buildOutput(tempnsPath, tempnwPath, precnsPath, precnwPath, tempProf, precProf, outProf))

    return compareImages(outputPath, comparePath)
Esempio n. 6
0
def test8Fn():
    tempProf = readInputProfile(getParentDirPath('defaultTempProfile'))
    precProf = readInputProfile(getParentDirPath('defaultPrecProfile'))
    outProf = OutputProfile(kColorTableDefault, defaultOceanColor, defaultUnknownColor)

    outputPath = getTestDirPath('test8-out.png')
    tempnsPath, tempnwPath, precnsPath, precnwPath = getProfiaInputs()

    comparePath = getTestDirPath('ProfiaOutputDefault.png')

    outputToFile(outputPath, buildOutput(tempnsPath, tempnwPath, precnsPath, precnwPath, tempProf, precProf, outProf))

    return compareImages(outputPath, comparePath)