示例#1
0
def test_bad_data3():
    lf = LogFile()
    lf.open("/tmp/nofile")
    with pytest.raises(IndexError):
        lf.write("B", ["122"], "2")
示例#2
0
def test_bad_data2():
    lf = LogFile()
    lf.open("/tmp/nofile")
    with pytest.raises(TypeError):
        lf.write("C", ("122"), ["2", "2"])
示例#3
0
def test_no_logfile():
    lf = LogFile()
    with pytest.raises(AttributeError):
        lf.write("B", ("122"), ["2", "2"])
示例#4
0
def test_bad_data3():
    lf=LogFile()
    lf.open("/tmp/nofile")
    with pytest.raises(IndexError):
        lf.write("B",["122"],"2")
示例#5
0
def test_bad_data2():
    lf=LogFile()
    lf.open("/tmp/nofile")
    with pytest.raises(TypeError):
        lf.write("C",("122"),["2","2"])
示例#6
0
def test_no_logfile():
    lf=LogFile()
    with pytest.raises(AttributeError):
        lf.write("B",("122"),["2","2"])