#!/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


[((140, 158), 'os.chdir', 'os.chdir', (['THIS_DIR'], {}), '(THIS_DIR)\n', (148, 158), False, 'import os\n'), ((230, 296), 'subprocess.check_output', 'subprocess.check_output', (['cmd'], {'stderr': 'subprocess.STDOUT', 'shell': '(True)'}), '(cmd, stderr=subprocess.STDOUT, shell=True)\n', (253, 296), False, 'import subprocess\n'), ((348, 414), 'subprocess.check_output', 'subprocess.check_output', (['cmd'], {'stderr': 'subprocess.STDOUT', 'shell': '(True)'}), '(cmd, stderr=subprocess.STDOUT, shell=True)\n', (371, 414), False, 'import subprocess\n'), ((109, 134), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (124, 134), False, 'import os\n')]