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