6
__docformat__ = "restructuredtext en"
8
#-------------------------------------------------------------------------------
9
# Copyright (C) 2008 The IPython Development Team
11
# Distributed under the terms of the BSD License. The full license is
12
# in the file COPYING, distributed as part of this software.
13
#-------------------------------------------------------------------------------
15
from IPython.frontend.linefrontendbase import LineFrontEndBase
16
from copy import deepcopy
17
import nose.tools as nt
19
class ConcreteLineFrontEnd(LineFrontEndBase):
20
""" A concrete class to test the LineFrontEndBase.
22
def capture_output(self):
25
def release_output(self):
29
def test_is_complete():
30
""" Tests line completion heuristic.
32
frontend = ConcreteLineFrontEnd()
33
yield nt.assert_true, not frontend.is_complete('for x in \\')
34
yield nt.assert_true, not frontend.is_complete('for x in (1, ):')
35
yield nt.assert_true, frontend.is_complete('for x in (1, ):\n pass')