예제 #1
0
def assert_file_older():
    with pycode.test("rel"):
        with pycode.test("is"):
            filecomp.assert_file_older('times_o', 'times_n')
        with pycode.test("not"):
            try:
                filecomp.assert_file_older('times_n', 'times_o')
            except AssertionError:
                pass
            else:
                assert 0, "should have had AssertionError"
    with pycode.test("abs"):
        with pycode.test("is"):
            filecomp.assert_file_older('times_o', hours=8)
            filecomp.assert_file_older('times_n', hours=3)
        with pycode.test("not"):
            try:
                filecomp.assert_file_older('times_n', hours=8)
            except AssertionError:
                pass
            else:
                assert 0, "should have had AssertionError"
예제 #2
0
파일: file_age.py 프로젝트: mcara/pandokia
def day_older_f():
    fc.assert_file_older('1d', days=3)
예제 #3
0
파일: file_age.py 프로젝트: mcara/pandokia
def day_older_p():
    fc.assert_file_older('1d', days=1)
예제 #4
0
파일: file_age.py 프로젝트: mcara/pandokia
def hour_older_f():
    fc.assert_file_older('60m', hours=1.25)
예제 #5
0
파일: file_age.py 프로젝트: mcara/pandokia
def hour_older_p():
    fc.assert_file_older('60m', hours=0.75)
예제 #6
0
파일: file_age.py 프로젝트: mcara/pandokia
def f_older_f():
    fc.assert_file_older('30m', '60m')
예제 #7
0
파일: file_age.py 프로젝트: mcara/pandokia
def f_older_p():
    fc.assert_file_older('60m', '30m')