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