|
1 |
| -import logging |
| 1 | +# Copyright 2025 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
2 | 15 | import sys
|
3 | 16 | from unittest.mock import ANY
|
4 | 17 | from unittest.mock import patch
|
@@ -31,3 +44,23 @@ def test_validate_max_llm_calls_too_large():
|
31 | 44 | ValueError, match=f"max_llm_calls should be less than {sys.maxsize}."
|
32 | 45 | ):
|
33 | 46 | RunConfig.validate_max_llm_calls(sys.maxsize)
|
| 47 | + |
| 48 | + |
| 49 | +def test_audio_transcription_configs_are_not_shared_between_instances(): |
| 50 | + config1 = RunConfig() |
| 51 | + config2 = RunConfig() |
| 52 | + |
| 53 | + # Validate output_audio_transcription |
| 54 | + assert config1.output_audio_transcription is not None |
| 55 | + assert config2.output_audio_transcription is not None |
| 56 | + assert ( |
| 57 | + config1.output_audio_transcription |
| 58 | + is not config2.output_audio_transcription |
| 59 | + ) |
| 60 | + |
| 61 | + # Validate input_audio_transcription |
| 62 | + assert config1.input_audio_transcription is not None |
| 63 | + assert config2.input_audio_transcription is not None |
| 64 | + assert ( |
| 65 | + config1.input_audio_transcription is not config2.input_audio_transcription |
| 66 | + ) |
0 commit comments