@classmethod
    def execTest(cls, content, timeout, disableOutput=True):
        child = pexpect.spawn(sys.executable + " -i")
        if disableOutput:
            child.logfile = None
        child.send(content + "\nexit(0)\n")

        out = []
        t0 = time.time()
        hitEOF = False
        while not hitEOF and time.time() - t0 < timeout:
            res = ""
            try:
                res = child.read_nonblocking(10000)
            except pexpect.EOF:
                hitEOF = True

            if not disableOutput:
                sys.stdout.write(res)
                sys.stdout.flush()

            out.append(res)
            time.sleep(0.01)

        out = "".join(out)

        if child.isalive():
            try:
                child.terminate()
                return 1
            except:
                pass

        if "Traceback" in out:
            return 1
        return 0
Pass 'content' through a python interpreter and check that the output has no 'Traceback'
dataset/ETHPy150Open ufora/ufora/test_scripts/pyfora1/commandlineSimulationTest.py/CommandlineSimulationTest.execTest