[Python-modules-commits] [speechrecognition] 05/07: Remove tests that require internet or pocketsphinx

Ethan Ward ethanward-guest at moszumanska.debian.org
Wed Jul 26 18:32:59 UTC 2017


This is an automated email from the git hooks/post-receive script.

ethanward-guest pushed a commit to branch master
in repository speechrecognition.

commit 3268c94de83e893d4d47f1237abdf81ebea4c287
Author: Ethan Ward <ethan.ward at mycroft.ai>
Date:   Wed Jul 26 13:23:46 2017 -0500

    Remove tests that require internet or pocketsphinx
---
 tests/test_recognition.py      | 4 ++++
 tests/test_special_features.py | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/test_recognition.py b/tests/test_recognition.py
index 269dc00..fb12414 100644
--- a/tests/test_recognition.py
+++ b/tests/test_recognition.py
@@ -13,21 +13,25 @@ class TestRecognition(unittest.TestCase):
         self.AUDIO_FILE_FR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "french.aiff")
         self.AUDIO_FILE_ZH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "chinese.flac")
 
+    @unittest.skip("Does not detect pocketsphinx")
     def test_sphinx_english(self):
         r = sr.Recognizer()
         with sr.AudioFile(self.AUDIO_FILE_EN) as source: audio = r.record(source)
         self.assertEqual(r.recognize_sphinx(audio), "wanted to three")
 
+    @unittest.skip("Requires internet connection")
     def test_google_english(self):
         r = sr.Recognizer()
         with sr.AudioFile(self.AUDIO_FILE_EN) as source: audio = r.record(source)
         self.assertEqual(r.recognize_google(audio), "one two three")
 
+    @unittest.skip("Requires internet connection")
     def test_google_french(self):
         r = sr.Recognizer()
         with sr.AudioFile(self.AUDIO_FILE_FR) as source: audio = r.record(source)
         self.assertEqual(r.recognize_google(audio, language="fr-FR"), u"et c'est la dictée numéro 1")
 
+    @unittest.skip("Requires internet connection")
     def test_google_chinese(self):
         r = sr.Recognizer()
         with sr.AudioFile(self.AUDIO_FILE_ZH) as source: audio = r.record(source)
diff --git a/tests/test_special_features.py b/tests/test_special_features.py
index c77ab44..77de54f 100644
--- a/tests/test_special_features.py
+++ b/tests/test_special_features.py
@@ -10,7 +10,8 @@ import speech_recognition as sr
 class TestSpecialFeatures(unittest.TestCase):
     def setUp(self):
         self.AUDIO_FILE_EN = os.path.join(os.path.dirname(os.path.realpath(__file__)), "english.wav")
-
+    
+    @unittest.skip("Pocketsphinx not found")
     def test_sphinx_keywords(self):
         r = sr.Recognizer()
         with sr.AudioFile(self.AUDIO_FILE_EN) as source: audio = r.record(source)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/speechrecognition.git



More information about the Python-modules-commits mailing list