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]
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]
def test_exec_make_empty_list(): with pytest.raises(IndexError): ut.exec_make([])
def test_exec_make_no_makefile(): with pytest.raises(FileNotFoundError): ut.exec_make(['make', '-n'])
def test_exec_make_empty_args(): with pytest.raises(TypeError): ut.exec_make()