~ubuntu-branches/ubuntu/raring/ipython/raring

« back to all changes in this revision

Viewing changes to IPython/frontend/tests/test_linefrontend.py

  • Committer: Package Import Robot
  • Author(s): Julian Taylor
  • Date: 2011-11-22 23:40:57 UTC
  • mfrom: (6.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20111122234057-ta86ocdahnhwmnd8
Tags: 0.11-2
* upload to unstable
* add patch fix-version-checks-for-pyzmq-2.1.10.patch
* fix debianize-error-messages.patch to reraise unknown exceptions
* suggest python-zmq for ipython package
* use dh_sphinxdoc
  - bump sphinx dependency to >= 1.0.7+dfsg-1~, replace libjs-jquery
    dependency with ${sphinxdoc:Depends} and drop ipython-doc.links
* remove empty directory from ipython
* link duplicate images in ipython-doc
* remove obsolete Conflicts and Replaces

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# encoding: utf-8
2
 
"""
3
 
Test the LineFrontEnd 
4
 
"""
5
 
 
6
 
__docformat__ = "restructuredtext en"
7
 
 
8
 
#-------------------------------------------------------------------------------
9
 
#  Copyright (C) 2008  The IPython Development Team
10
 
#
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
 
#-------------------------------------------------------------------------------
14
 
 
15
 
from IPython.frontend.linefrontendbase import LineFrontEndBase
16
 
from copy import deepcopy
17
 
import nose.tools as nt
18
 
 
19
 
class ConcreteLineFrontEnd(LineFrontEndBase):
20
 
    """ A concrete class to test the LineFrontEndBase.
21
 
    """
22
 
    def capture_output(self):
23
 
        pass
24
 
 
25
 
    def release_output(self):
26
 
        pass
27
 
 
28
 
 
29
 
def test_is_complete():
30
 
    """ Tests line completion heuristic.
31
 
    """
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')
36
 
 
37