コード例 #1
0
 def test_terminate_index_normal_audio(self):
     """Test terminate_index_audio valid index"""
     test = TestSources(audio_port=4000)
     test.running_tests_audio = [
         self.MockTest2(1),
         self.MockTest2(2),
         self.MockTest2(3),
         self.MockTest2(10)]
     test.terminate_index_audio(0)
コード例 #2
0
 def test_terminate_index_normal_audio(self):
     """Test terminate_index_audio valid index"""
     test = TestSources(audio_port=4000)
     test.running_tests_audio = [
         self.MockTest2(1),
         self.MockTest2(2),
         self.MockTest2(3),
         self.MockTest2(10)
     ]
     test.terminate_index_audio(0)
コード例 #3
0
 def test_terminate_index_error_audio(self):
     """Test terminate_index_audio - invalid index"""
     testsrc = TestSources(audio_port=4000)
     testsrc.running_tests_audio = [
         self.MockTest2(1),
         self.MockTest2(2),
         self.MockTest2(3),
         self.MockTest2(10)]
     tests = [-100, 20, 1e10, "hi", [1, 2, 3]]
     for test in tests:
         with pytest.raises(InvalidIndexError):
             testsrc.terminate_index_audio(test)
コード例 #4
0
 def test_terminate_index_error_audio(self):
     """Test terminate_index_audio - invalid index"""
     testsrc = TestSources(audio_port=4000)
     testsrc.running_tests_audio = [
         self.MockTest2(1),
         self.MockTest2(2),
         self.MockTest2(3),
         self.MockTest2(10)
     ]
     tests = [-100, 20, 1e10, "hi", [1, 2, 3]]
     for test in tests:
         with pytest.raises(InvalidIndexError):
             testsrc.terminate_index_audio(test)