Index: webrtc/modules/audio_processing/test/py_quality_assessment/test_simulation.py |
diff --git a/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment-export.py b/webrtc/modules/audio_processing/test/py_quality_assessment/test_simulation.py |
similarity index 56% |
copy from webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment-export.py |
copy to webrtc/modules/audio_processing/test/py_quality_assessment/test_simulation.py |
index 1b526c1b054918518b39370902d82a1fd53aff29..0f64a6af9733b6f3ab369d4c8d7947e0db86aa89 100644 |
--- a/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment-export.py |
+++ b/webrtc/modules/audio_processing/test/py_quality_assessment/test_simulation.py |
@@ -1,4 +1,3 @@ |
-#!/usr/bin/env python3 |
# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
# |
# Use of this source code is governed by a BSD-style license |
@@ -6,3 +5,15 @@ |
# tree. An additional intellectual property rights grant can be found |
# in the file PATENTS. All contributing project authors may |
# be found in the AUTHORS file in the root of the source tree. |
+ |
+import unittest |
+ |
+import apm_quality_assessment |
+ |
+class TestSimulationScript(unittest.TestCase): |
+ |
+ def test_main(self): |
+ # Exit with error code if no arguments are passed. |
+ with self.assertRaises(SystemExit) as cm: |
+ apm_quality_assessment.main() |
+ self.assertGreater(cm.exception.code, 0) |