Skip to content

Commit e357b23

Browse files
committed
Added tests for OutputMode.inSpeech and OutputMode.inBraille
1 parent f83401d commit e357b23

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

tests/unit/test_config.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ def test_DefaultProfile_Unmodified(self):
795795
profile['documentFormatting']['reportFontAttributes']
796796
with self.assertRaises(KeyError):
797797
profile['documentFormatting']['fontAttributeReporting']
798-
798+
799799
def test_defaultProfile_reportFontAttributes_false(self):
800800
"""reportFontAttributes set to False."""
801801
configString = """
@@ -806,7 +806,7 @@ def test_defaultProfile_reportFontAttributes_false(self):
806806
upgradeConfigFrom_11_to_12(profile)
807807
self.assertEqual(profile['documentFormatting']['reportFontAttributes'], 'False')
808808
self.assertEqual(profile['documentFormatting']['fontAttributeReporting'], OutputMode.OFF.value)
809-
809+
810810
def test_defaultProfile_reportFontAttributes_true(self):
811811
"""reportFontAttributes set to True."""
812812
configString = """
@@ -840,7 +840,7 @@ def test_set_reportFontAttributes_false(self):
840840
config['reportFontAttributes'] = False
841841
self.assertEqual(config['reportFontAttributes'], False)
842842
self.assertEqual(config['fontAttributeReporting'], OutputMode.OFF)
843-
843+
844844
def test_set_reportFontAttributes_true(self):
845845
config = self.config
846846
config['reportFontAttributes'] = True
@@ -872,6 +872,20 @@ def test_set_fontAttributeReporting_speechAndBraille(self):
872872
self.assertEqual(config['reportFontAttributes'], True)
873873

874874

875+
class Config_ConfigFlags_OutputMode(unittest.TestCase):
876+
def test_inSpeech(self):
877+
self.assertTrue(OutputMode.SPEECH.inSpeech)
878+
self.assertTrue(OutputMode.SPEECH_AND_BRAILLE.inSpeech)
879+
self.assertFalse(OutputMode.BRAILLE.inSpeech)
880+
self.assertFalse(OutputMode.OFF.inSpeech)
881+
882+
def test_inBraille(self):
883+
self.assertTrue(OutputMode.BRAILLE.inBraille)
884+
self.assertTrue(OutputMode.SPEECH_AND_BRAILLE.inBraille)
885+
self.assertFalse(OutputMode.SPEECH.inBraille)
886+
self.assertFalse(OutputMode.OFF.inBraille)
887+
888+
875889
class Config_AggregatedSection_getitem(unittest.TestCase):
876890
def setUp(self):
877891
manager = MagicMock(ConfigManager())

0 commit comments

Comments
 (0)