[Python-modules-commits] [speechrecognition-python] 05/08: Update patch to fix typo

Ethan Ward ethanward-guest at moszumanska.debian.org
Fri Sep 1 23:13: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-python.

commit 2389c5a08d2e19cb244c2b633f9373836bcb4270
Author: Ethan Ward <ethan.ward at mycroft.ai>
Date:   Fri Sep 1 12:35:57 2017 -0500

    Update patch to fix typo
---
 debian/patches/0001-Allow-disabling-tests.patch | 28 +++++++++++++++++--------
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/debian/patches/0001-Allow-disabling-tests.patch b/debian/patches/0001-Allow-disabling-tests.patch
index 1b16137..415de08 100644
--- a/debian/patches/0001-Allow-disabling-tests.patch
+++ b/debian/patches/0001-Allow-disabling-tests.patch
@@ -2,21 +2,31 @@ From: Ethan Ward <ethan.ward at mycroft.ai>
 Date: Fri, 1 Sep 2017 12:16:56 -0500
 Subject: Allow disabling tests
 
+Fix typos
 ---
- tests/test_audio.py            | 4 ++++
+ tests/test_audio.py            | 6 +++++-
  tests/test_recognition.py      | 4 ++++
  tests/test_special_features.py | 1 +
- 3 files changed, 9 insertions(+)
+ 3 files changed, 10 insertions(+), 1 deletion(-)
 
 diff --git a/tests/test_audio.py b/tests/test_audio.py
-index 4a18860..13f779d 100644
+index 4a18860..fccfc16 100644
 --- a/tests/test_audio.py
 +++ b/tests/test_audio.py
+@@ -1,7 +1,7 @@
+ #!/usr/bin/env python3
+ 
+ import unittest
+-from os import path
++from os import path, environ
+ 
+ import speech_recognition as sr
+ 
 @@ -98,6 +98,7 @@ class TestAudioFile(unittest.TestCase):
          self.assertEqual(audio.sample_width, 2)
          self.assertSimilar(audio.get_raw_data()[:32], b"\x00\x00\xfe\xff\x02\x00\xfe\xff\xff\xff\x04\x00\xfa\xff\x04\x00\xfa\xff\t\x00\xf6\xff\n\x00\xfa\xff\xff\xff\x08\x00\xf5\xff")
  
-+    @unittest.skipIf(os.environ.get("FLAC_TEST_SKIP", False), "Skipping flac tests")
++    @unittest.skipIf(environ.get("FLAC_TEST_SKIP", False), "Skipping flac tests")
      def test_flac_mono_16_bit(self):
          r = sr.Recognizer()
          with sr.AudioFile(path.join(path.dirname(path.realpath(__file__)), "audio-mono-16-bit-44100Hz.flac")) as source: audio = r.record(source)
@@ -24,7 +34,7 @@ index 4a18860..13f779d 100644
          self.assertEqual(audio.sample_width, 2)
          self.assertSimilar(audio.get_raw_data()[:32], b"\x00\x00\xff\xff\x01\x00\xff\xff\x00\x00\x01\x00\xfe\xff\x02\x00\xfc\xff\x06\x00\xf9\xff\x06\x00\xfe\xff\xfe\xff\x05\x00\xfa\xff")
  
-+    @unittest.skipIf(os.environ.get("FLAC_TEST_SKIP", False), "Skipping flac tests")
++    @unittest.skipIf(environ.get("FLAC_TEST_SKIP", False), "Skipping flac tests")
      def test_flac_mono_24_bit(self):
          r = sr.Recognizer()
          with sr.AudioFile(path.join(path.dirname(path.realpath(__file__)), "audio-mono-24-bit-44100Hz.flac")) as source: audio = r.record(source)
@@ -32,7 +42,7 @@ index 4a18860..13f779d 100644
          else:
              self.assertSimilar(audio.get_raw_data()[:32], b"\x00\x00\x00\x00\x00\xff\xfe\xff\x00\x02\x01\x00\x00\xfd\xfe\xff\x00\x04\x00\x00\x00\xfc\x00\x00\x00\x04\xfe\xff\x00\xfb\x00\x00")
  
-+    @unittest.skipIf(os.environ.get("FLAC_TEST_SKIP", False), "Skipping flac tests")
++    @unittest.skipIf(environ.get("FLAC_TEST_SKIP", False), "Skipping flac tests")
      def test_flac_stereo_16_bit(self):
          r = sr.Recognizer()
          with sr.AudioFile(path.join(path.dirname(path.realpath(__file__)), "audio-stereo-16-bit-44100Hz.flac")) as source: audio = r.record(source)
@@ -40,7 +50,7 @@ index 4a18860..13f779d 100644
          self.assertEqual(audio.sample_width, 2)
          self.assertSimilar(audio.get_raw_data()[:32], b"\xff\xff\xff\xff\x02\x00\xfe\xff\x00\x00\x01\x00\xfd\xff\x01\x00\xff\xff\x04\x00\xfa\xff\x05\x00\xff\xff\xfd\xff\x08\x00\xf6\xff")
  
-+    @unittest.skipIf(os.environ.get("FLAC_TEST_SKIP", False), "Skipping flac tests")
++    @unittest.skipIf(environ.get("FLAC_TEST_SKIP", False), "Skipping flac tests")
      def test_flac_stereo_24_bit(self):
          r = sr.Recognizer()
          with sr.AudioFile(path.join(path.dirname(path.realpath(__file__)), "audio-stereo-24-bit-44100Hz.flac")) as source: audio = r.record(source)
@@ -75,14 +85,14 @@ index 269dc00..4c78c99 100644
          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..e9cc92b 100644
+index c77ab44..a4018d3 100644
 --- a/tests/test_special_features.py
 +++ b/tests/test_special_features.py
 @@ -11,6 +11,7 @@ class TestSpecialFeatures(unittest.TestCase):
      def setUp(self):
          self.AUDIO_FILE_EN = os.path.join(os.path.dirname(os.path.realpath(__file__)), "english.wav")
  
-+    @unittest.skipIf(os.environ.get('POCKETSPHINX_TEST_SKIP', FALSE),"Skipping pocketsphinx tests")
++    @unittest.skipIf(os.environ.get('POCKETSPHINX_TEST_SKIP', False),"Skipping pocketsphinx tests")
      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-python.git



More information about the Python-modules-commits mailing list