def test_issue2(self):
        """ Test for issue #2.

        """
        monitor = self.monitor

        FOO = """
def foo():
    a = []
    for i in range(20):
        a.append(i+sum(a))

foo()
"""

        @monitor.attach
        def boo():
            code = compile(FOO, 'foo', 'exec')
            exec code in globals(), {}

        try:
            boo()
        except __HOLE__:
            msg = ("Issue #2 -- line monitor fails when exec is used"
                   " on code compiled from a string -- exists.")
            self.fail(msg)
dataset/ETHPy150Open enthought/pikos/pikos/tests/test_cline_memory_monitor.py/TestLineMemoryMonitor.test_issue2