예제 #1
0
def fileTypeTest(tmpdir):
    infile = tmpdir.mkdir("files").join("demo.mp4")
    infile.write("something")
    outfile = tmpdir.join("files", "demo.wav")
    print(infile, outfile)
    with pytest.raises(FileTypeException):
        tester = Converter(str(infile), str(outfile))
        tester.convert()
예제 #2
0
def overwriteTest(tmpdir):
    infile = tmpdir.mkdir("files").join("demo.mp3")
    infile.write("something")
    outfile = tmpdir.join("files", "demo.wav")
    outfile.write("anything")
    with pytest.raises(OverWriteException):
        tester = Converter(str(infile), str(outfile))
        tester.convert()
예제 #3
0
def fileExistTest(tmpdir):
    outfile = tmpdir.mkdir("files").join("demo.wav")
    with pytest.raises(FileNotExistException):
        tester = Converter("any.mp3", str(outfile))
        tester.convert()