tests.ui_tests module#
Tests for the user interface.
- class tests.ui_tests.FakeUIColorizedTestBase(*args, **kwargs)[source]#
Bases:
TestCase
Base class for test cases requiring that colorized output is active.
- abstract_class = True#
- expect_color = True#
- expected = 'Hello world you!'#
- net = False#
- class tests.ui_tests.FakeUITest(*args, **kwargs)[source]#
Bases:
DisableSiteMixin
,TestCase
Test case to allow doing uncolorized general UI tests.
- abstract_class = False#
- expect_color = False#
- expected = 'Hello world you! ***'#
- ui_class#
alias of
UI
- class tests.ui_tests.FakeUnixTest(*args, **kwargs)[source]#
Bases:
FakeUIColorizedTestBase
,FakeUITest
Test case to allow doing colorized Unix tests in any environment.
- abstract_class = False#
- ui_class#
alias of
UnixUI
- class tests.ui_tests.FakeWin32Test(*args, **kwargs)[source]#
Bases:
FakeUIColorizedTestBase
,FakeUITest
Test case to allow doing colorized Win32 tests in any environment.
This only patches the ctypes import in the terminal_interface_win32 module. As the Win32CtypesUI is using the std-streams from another import these will be unpatched.
- abstract_class = False#
- ui_class#
alias of
Win32UI
- class tests.ui_tests.FakeWin32UncolorizedTest(*args, **kwargs)[source]#
Bases:
FakeWin32Test
Test case to allow doing uncolorized Win32 tests in any environment.
- abstract_class = True#
- expect_color = False#
- expected = 'Hello world you! ***'#
- class tests.ui_tests.TestTerminalInput(methodName='runTest')[source]#
Bases:
UITestCase
Terminal input tests.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- input_choice_output = 'question ([A]nswer 1, a[n]swer 2, an[s]wer 3): '#
- class tests.ui_tests.TestTerminalOutput(methodName='runTest')[source]#
Bases:
UITestCase
Terminal output tests.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- tests = [('debug', 10, '', ''), ('verbose', 18, '', ''), ('info', 20, '', 'info\n'), ('stdout', 16, 'stdout\n', ''), ('input', 25, '', 'input\n'), ('WARNING', 30, '', 'WARNING: WARNING\n'), ('ERROR', 40, '', 'ERROR: ERROR\n'), ('CRITICAL', 50, '', 'CRITICAL: CRITICAL\n')]#
- class tests.ui_tests.TestTerminalOutputColorUnix(methodName='runTest')[source]#
Bases:
UITestCase
Terminal output color tests.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- str1 = 'text <<lightpurple>>light purple text<<default>> text'#
- str2 = 'normal text <<lightpurple>> light purple <<lightblue>> light blue <<previous>> light purple <<default>> normal text'#
- class tests.ui_tests.TestTerminalUnicodeUnix(methodName='runTest')[source]#
Bases:
UITestCase
Terminal output tests for Unix.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- class tests.ui_tests.TestTransliterationTable(*args, **kwargs)[source]#
Bases:
DisableSiteMixin
,TestCase
Test transliteration table.
- abstract_class = False#
- class tests.ui_tests.TestTransliterationUnix(methodName='runTest')[source]#
Bases:
UITestCase
Terminal output transliteration tests.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- class tests.ui_tests.UITestCase(methodName='runTest')[source]#
Bases:
TestCaseBase
UI tests.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- net = False#