This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You can find a copy of the GNU General Public License in the file extras/COPYING.TXT included in the distribution of this program, or see: <http://www.gnu.org/licenses/>. ''' __version__ = "2.0.0" __author__ = "David Cortesi" __copyright__ = "Copyright 2013, 2014 David Cortesi" __maintainer__ = "David Cortesi" __email__ = "*****@*****.**" ''' Sikuli/interactive driver for wordview.py ''' import test_boilerplate as T T.set_up_paths() T.make_app() T.make_main() T.open_book() # Reach into the book and get a reference to the Char widget # and make it the visible tab. wp = T.book.get_word_panel() T.book.make_me_visible(wp) T.main.show() T.app.exec_()
''' __version__ = "2.0.0" __author__ = "David Cortesi" __copyright__ = "Copyright 2013, 2014 David Cortesi" __maintainer__ = "David Cortesi" __email__ = "*****@*****.**" ''' Unit test for colors.py. Originally it wasn't going to need a unit test driver, just using it from mainwindow would be enough, but it has acquired a lot of behavior. ''' import test_boilerplate as T import logging T.set_up_paths() T.make_app() import constants as C import colors from PyQt5.QtGui import (QColor,QBrush, QTextCharFormat) # check initialize # check defaults on empty settings T.settings.clear() colors.initialize(T.settings) colors.shutdown(T.settings) assert T.settings.value('colors/spell_color') == '#ff00ff' # == magenta assert T.settings.value('colors/spell_style') == QTextCharFormat.WaveUnderline assert T.settings.value('colors/scanno_color') == '#d8bfd8' # == 'thistle' assert T.settings.value('colors/scanno_style') == QTextCharFormat.NoUnderline