예제 #1
0
def test_exec_make_db_correct1():
    ''' for symlink: this is tricky bc make fails if target file
        doesn't exist '''
    os.chdir("data/task-1")  # task-1/src/Makefile
    db = ut.exec_make(['make', '-n', '--print-data-base'])
    assert "# GNU Make" in db[0:100]
예제 #2
0
def test_exec_make_db_correct0():
    os.chdir("data/task-0")  # task-0/Makefile
    db = ut.exec_make(['make', '-n', '--print-data-base'])
    assert "# GNU Make" in db[0:100]
예제 #3
0
def test_exec_make_empty_list():
    with pytest.raises(IndexError):
        ut.exec_make([])
예제 #4
0
def test_exec_make_no_makefile():
    with pytest.raises(FileNotFoundError):
        ut.exec_make(['make', '-n'])
예제 #5
0
def test_exec_make_empty_args():
    with pytest.raises(TypeError):
        ut.exec_make()