#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#The MIT License (MIT)
#
#Copyright (c) <2013-2014> <Colin Duquesnoy and others, see AUTHORS.txt>
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
#
#The above copyright notice and this permission notice shall be included in
#all copies or substantial portions of the Software.
#
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#THE SOFTWARE.
#
"""
This is a simple test script to that is meant to be run by Travis CI to ensure
everything works properly foreach bindings on each supported python
version (2.7, 3.2, 3.3).

It runs a QApplication and shows a QPythonCodeEdit for 500ms.
"""
import sys
from PyQt4 import QtCore, QtGui
from pyqode.python.editor import QPythonCodeEdit


def leave():
    app = QtGui.QApplication.instance()
    app.exit(0)


def test_editor():
    app = QtGui.QApplication(sys.argv)
    editor = QPythonCodeEdit()
    editor.show()
    editor.start_server()
    editor.open_file(__file__)
    QtCore.QTimer.singleShot(500, leave)
    app.exec_()
    editor.stop_server()
    del editor
    del app

@@ -1519,16 +1519,64 @@
 deEdit%0A%0A
+import logging%0Alogging.basicConfig(level=True)%0A%0A
 %0Adef lea

Add debug output to test