Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(727)

Unified Diff: webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py

Issue 2989823002: Input signal creation for non-existing input signal files (Closed)
Patch Set: merge Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py
diff --git a/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py b/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py
index 0bf7e1ab98595405d6bc7349b25939dfa7856a63..6239d516b0fbc67ca62f6228292ea1c0a6efa7be 100644
--- a/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py
+++ b/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py
@@ -52,6 +52,25 @@ class TestTestDataGenerators(unittest.TestCase):
shutil.rmtree(self._test_data_cache_path)
shutil.rmtree(self._fake_air_db_path)
+ def testInputSignalCreation(self):
+ # Init.
+ generator = test_data_generation.IdentityTestDataGenerator('tmp')
+ input_signal_filepath = os.path.join(
+ self._test_data_cache_path, 'pure_tone-440_1000.wav')
+
+ # Check that the input signal is generated.
+ self.assertFalse(os.path.exists(input_signal_filepath))
+ generator.Generate(
+ input_signal_filepath=input_signal_filepath,
+ test_data_cache_path=self._test_data_cache_path,
+ base_output_path=self._base_output_path)
+ self.assertTrue(os.path.exists(input_signal_filepath))
+
+ # Check input signal properties.
+ input_signal = signal_processing.SignalProcessingUtils.LoadWav(
+ input_signal_filepath)
+ self.assertEqual(1000, len(input_signal))
+
def testTestDataGenerators(self):
# Preliminary check.
self.assertTrue(os.path.exists(self._base_output_path))
« no previous file with comments | « webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698