deluge/deluge/tests/test_ui_console_fields.py
Calum Lind 3a2ff0c188 [Lint] Convert all python double quotes to single quotes
* A rather disruptive change but for a few reasons such as easier to read,
   easier type, keep consistent and javascript code uses single quotes.
 * There are a few exceptions for the automated process:
    * Any double quotes in comments
    * Triple double quotes for docstrings
    * Strings containing single quotes are left e.g. "they're"

 * To deal with merge conflicts from feature branches it is best to follow
   these steps for each commit:
     * Create a patch: `git format-patch -1 <sha1>`
     * Edit the patch and replace double quotes with single except those in
       comments or strings containing an unescaped apostrophe.
     * Check the patch `git apply --check <patchfile>` and fix any remaining
       issues if it outputs an error.
     * Apply the patch `git am < <patchfile>`
2016-11-03 21:45:45 +00:00

30 lines
683 B
Python

# -*- coding: utf-8 -*-
from twisted.trial import unittest
from deluge.ui.console.widgets.fields import TextInput
class Parent(object):
def __init__(self):
self.border_off_x = 1
self.pane_width = 20
class UICommonTestCase(unittest.TestCase):
def setUp(self): # NOQA
self.parent = Parent()
def tearDown(self): # NOQA
pass
def test_text_input(self):
def move_func(self, r, c):
self._cursor_row = r
self._cursor_col = c
t = TextInput(self.parent, 'name', 'message', move_func, 20, '/text/field/file/path', complete=False)
self.assertTrue(t) # Shut flake8 up (unused variable)