Beispiel #1
0
 def test_pitchNotifications(self):
     expected = repr([PitchCommand(offset=30), 'A', PitchCommand()])
     output = _getSpellingCharAddCapNotification(
         speakCharAs='A',
         sayCapForCapitals=False,
         capPitchChange=30,
         beepForCapitals=False,
     )
     self.assertEqual(repr(list(output)), expected)
Beispiel #2
0
 def test_noNotifications(self):
     expected = repr([
         'A',
     ])
     output = _getSpellingCharAddCapNotification(
         speakCharAs='A',
         sayCapForCapitals=False,
         capPitchChange=0,
         beepForCapitals=False,
     )
     self.assertEqual(repr(list(output)), expected)
Beispiel #3
0
 def test_beepNotifications(self):
     expected = repr([
         BeepCommand(2000, 50, left=50, right=50),
         'A',
     ])
     output = _getSpellingCharAddCapNotification(
         speakCharAs='A',
         sayCapForCapitals=False,
         capPitchChange=0,
         beepForCapitals=True,
     )
     self.assertEqual(repr(list(output)), expected)
Beispiel #4
0
 def test_capNotificationsWithPlaceHolderBefore(self):
     self.translationsFake.translationResults["cap %s"] = "%s cap"
     expected = repr([
         'A',
         ' cap',
     ])  # for English this would be "cap A"
     output = _getSpellingCharAddCapNotification(
         speakCharAs='A',
         sayCapForCapitals=True,
         capPitchChange=0,
         beepForCapitals=False,
     )
     self.assertEqual(repr(list(output)), expected)