Beispiel #1
0
 def test_blank(self):
     expected = repr([
         'blank',
     ])
     output = _getSpellingSpeechWithoutCharMode(
         text='',
         locale=None,
         useCharacterDescriptions=False,
         sayCapForCapitals=False,
         capPitchChange=0,
         beepForCapitals=False,
     )
     self.assertEqual(repr(list(output)), expected)
Beispiel #2
0
 def test_symbol(self):
     expected = repr([
         'bang',
         EndUtteranceCommand(),
     ])
     output = _getSpellingSpeechWithoutCharMode(
         text='!',
         locale=None,
         useCharacterDescriptions=False,
         sayCapForCapitals=False,
         capPitchChange=0,
         beepForCapitals=False,
     )
     self.assertEqual(repr(list(output)), expected)
Beispiel #3
0
 def test_languageDetection(self):
     config.conf['speech']['autoLanguageSwitching'] = True
     expected = repr([
         LangChangeCommand('fr_FR'),
         'a',
         EndUtteranceCommand(),
     ])
     output = _getSpellingSpeechWithoutCharMode(
         text='a',
         locale='fr_FR',
         useCharacterDescriptions=False,
         sayCapForCapitals=False,
         capPitchChange=0,
         beepForCapitals=False,
     )
     self.assertEqual(repr(list(output)), expected)
Beispiel #4
0
 def test_cap(self):
     expected = repr([
         PitchCommand(offset=30),
         BeepCommand(2000, 50, left=50, right=50),
         'cap ',
         'A',
         PitchCommand(),
         EndUtteranceCommand(),
     ])
     output = _getSpellingSpeechWithoutCharMode(
         text='A',
         locale=None,
         useCharacterDescriptions=False,
         sayCapForCapitals=True,
         capPitchChange=30,
         beepForCapitals=True,
     )
     self.assertEqual(repr(list(output)), expected)