Skip to content

Commit 3d04cfb

Browse files
committed
Address code review comments.
1 parent a8f946e commit 3d04cfb

4 files changed

Lines changed: 8 additions & 16 deletions

File tree

‎nvdaHelper/ISimpleDOM_sconscript‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ tlbFile,headerFile,iidSourceFile,proxySourceFile,dlldataSourceFile=env.TypeLibra
2424
source=idlFile,
2525
MIDLFLAGS=['/c_ext','/I',Dir('.')],
2626
)
27-
# hack: Ignore midl.exe when deciding to rebuild, as its position in the dependencies
27+
# #7036: hack: Ignore midl.exe when deciding to rebuild, as its position in the dependencies
2828
# is different in the run before the idl files are copied versus subsequent runs.
2929
midl=env.WhereIs(env["MIDL"])
3030
for target in (tlbFile,headerFile,iidSourceFile,proxySourceFile,dlldataSourceFile):

‎nvdaHelper/mathPlayer_sconscript‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ tlbFile,headerFile,iidSourceFile,proxySourceFile,dlldataSourceFile=env.TypeLibra
2121
source=idlFile,
2222
MIDLFLAGS=['/I',Dir('.')],
2323
)
24-
# hack: Ignore midl.exe when deciding to rebuild, as its position in the dependencies
24+
# #7036: hack: Ignore midl.exe when deciding to rebuild, as its position in the dependencies
2525
# is different in the run before the idl files are copied versus subsequent runs.
2626
midl=env.WhereIs(env["MIDL"])
2727
for target in (tlbFile,headerFile,iidSourceFile,proxySourceFile,dlldataSourceFile):

‎tests/unit/__init__.py‎

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
All unit tests should reside within this package and should be
99
divided into modules and packages similar to the code they are testing.
1010
Test modules must have a C{test_} prefix
11-
and should contain one or more classes with a C{Test} prefix which subclass L{TestCase}.
11+
and should contain one or more classes with a C{Test} prefix which subclass C{unittest.TestCase}.
1212
Methods in test classes should have a C{test_} prefix.
1313
"""
1414

@@ -45,7 +45,8 @@ class AppArgs:
4545
# The path to this package might be relative, so make it absolute,
4646
# since we just changed directory.
4747
__path__[0] = UNIT_DIR
48-
# We don't want logging.
48+
# We don't want logging for now,
49+
# though we may optionally want this in future; see #7045.
4950
import logging
5051
from logHandler import log
5152
log.addHandler(logging.NullHandler())
@@ -79,11 +80,3 @@ class PlaceholderNVDAObject(NVDAObject):
7980
import speech
8081
speech.speak = lambda speechSequence, symbolLevel=None: None
8182
speech.speakSpelling = lambda text, locale=None, useCharacterDescriptions=False: None
82-
83-
### Base classes/utility functions.
84-
85-
import unittest
86-
87-
class TestCase(unittest.TestCase):
88-
"""The base class which all test case classes should subclass.
89-
"""

‎tests/unit/test_cursorManager.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@
99

1010
import unittest
1111
import cursorManager
12-
from . import TestCase
1312
from .textProvider import BasicTextProvider
1413

1514
class 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"
@@ -63,7 +62,7 @@ def test_selectForwardThenSelBackward(self):
6362
cm.script_selectWord_back(None) # "b" unselected, "a" selected
6463
self.assertEqual(cm.selectionOffsets, (0, 1)) # "a" selected
6564

66-
class TestSelectAll(TestCase):
65+
class TestSelectAll(unittest.TestCase):
6766
"""Tests the select all command starting from different caret positions.
6867
"""
6968

0 commit comments

Comments
 (0)