#!/usr/bin/env python

import subprocess
import os

def setup_module(module):
    THIS_DIR = os.path.dirname(os.path.abspath(__file__))
    os.chdir(THIS_DIR)

def teardown_module(module):
    cmd = ["make clean"]
    cmdOutput = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)


def test_1():
    cmd = ["make"]
    cmdOutput = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)

    passed = False
    for l in cmdOutput.decode('utf-8').split("\n"):
        if "#FPCHECKER: main() found" in l:
            passed = True

    assert passed == True


[((8, 4, 8, 22), 'os.chdir', 'os.chdir', ({(8, 13, 8, 21): 'THIS_DIR'}, {}), '(THIS_DIR)', False, 'import os\n'), ((12, 16, 12, 82), 'subprocess.check_output', 'subprocess.check_output', (), '', False, 'import subprocess\n'), ((17, 16, 17, 82), 'subprocess.check_output', 'subprocess.check_output', (), '', False, 'import subprocess\n'), ((7, 31, 7, 56), 'os.path.abspath', 'os.path.abspath', ({(7, 47, 7, 55): '__file__'}, {}), '(__file__)', False, 'import os\n')]