99
1010import unittest
1111import cursorManager
12- from . import TestCase
1312from .textProvider import BasicTextProvider
1413
1514class CursorManager (cursorManager .CursorManager , BasicTextProvider ):
1615 """CursorManager which navigates within a provided string of text.
1716 """
1817
19- class TestMove (TestCase ):
18+ class TestMove (unittest . TestCase ):
2019
2120 def test_nextChar (self ):
2221 cm = CursorManager (text = "abc" ) # Caret at "a"
@@ -28,7 +27,7 @@ def test_prevChar(self):
2827 cm .script_moveByCharacter_back (None )
2928 self .assertEqual (cm .selectionOffsets , (0 , 0 )) # Caret at "a"
3029
31- class TestSelection (TestCase ):
30+ class TestSelection (unittest . TestCase ):
3231
3332 def test_selectNextChar (self ):
3433 cm = CursorManager (text = "abc" ) # Caret at "a"
@@ -41,13 +40,16 @@ def test_selectPrevChar(self):
4140 self .assertEqual (cm .selectionOffsets , (0 , 1 )) # "a" selected
4241
4342 def test_unselectPrevChar (self ):
43+ """Depends on behavior tested by test_selectNextChar.
44+ """
4445 cm = CursorManager (text = "abc" ) # Caret at "a"
4546 cm .script_selectCharacter_forward (None ) # "a" selected
4647 cm .script_selectCharacter_back (None ) # "a" unselected
4748 self .assertEqual (cm .selectionOffsets , (0 , 0 )) # Caret at "a", no selection
4849
4950 def test_selForwardThenUnselThenSelBackward (self ):
5051 """Test selecting forward, then unselecting and selecting backward.
52+ Depends on behavior tested by test_unselectPrevChar.
5153 """
5254 cm = CursorManager (text = "abc" , selection = (1 , 1 )) # Caret at "b"
5355 cm .script_selectCharacter_forward (None ) # "b" selected
@@ -57,13 +59,14 @@ def test_selForwardThenUnselThenSelBackward(self):
5759
5860 def test_selectForwardThenSelBackward (self ):
5961 """Test selecting forward, then selecting backward without unselecting.
62+ Depends on behavior tested by test_selectNextChar.
6063 """
6164 cm = CursorManager (text = "abc" , selection = (1 , 1 )) # Caret at "b"
6265 cm .script_selectCharacter_forward (None ) # "b" selected
6366 cm .script_selectWord_back (None ) # "b" unselected, "a" selected
6467 self .assertEqual (cm .selectionOffsets , (0 , 1 )) # "a" selected
6568
66- class TestSelectAll (TestCase ):
69+ class TestSelectAll (unittest . TestCase ):
6770 """Tests the select all command starting from different caret positions.
6871 """
6972
0 commit comments