Spaces:
Running
Running
alessandro trinca tornidor
commited on
Commit
·
f27173d
1
Parent(s):
5f896de
test: fix test_GetAccuracyFromRecordedAudio test case
Browse files
tests/lambdas/test_lambdaSpeechToScore.py
CHANGED
@@ -191,15 +191,15 @@ class TestGetAccuracyFromRecordedAudio(unittest.TestCase):
|
|
191 |
del os.environ["PYTHONUTF8"]
|
192 |
|
193 |
def test_GetAccuracyFromRecordedAudio(self):
|
194 |
-
|
195 |
with open(EVENTS_FOLDER / "GetAccuracyFromRecordedAudio.json", "r") as src:
|
196 |
inputs_outputs = json.load(src)
|
197 |
inputs = inputs_outputs["inputs"]
|
198 |
for language, event_content in inputs.items():
|
|
|
199 |
current_expected_output = expected_GetAccuracyFromRecordedAudio[language]
|
200 |
output = lambdaSpeechToScore.lambda_handler(event_content, [])
|
201 |
output = json.loads(output)
|
202 |
-
expected_GetAccuracyFromRecordedAudio[language] = output
|
203 |
app_logger.info(
|
204 |
f"output type:{type(output)}, expected_output type:{type(current_expected_output)}."
|
205 |
)
|
|
|
191 |
del os.environ["PYTHONUTF8"]
|
192 |
|
193 |
def test_GetAccuracyFromRecordedAudio(self):
|
194 |
+
self.maxDiff = None
|
195 |
with open(EVENTS_FOLDER / "GetAccuracyFromRecordedAudio.json", "r") as src:
|
196 |
inputs_outputs = json.load(src)
|
197 |
inputs = inputs_outputs["inputs"]
|
198 |
for language, event_content in inputs.items():
|
199 |
+
set_seed()
|
200 |
current_expected_output = expected_GetAccuracyFromRecordedAudio[language]
|
201 |
output = lambdaSpeechToScore.lambda_handler(event_content, [])
|
202 |
output = json.loads(output)
|
|
|
203 |
app_logger.info(
|
204 |
f"output type:{type(output)}, expected_output type:{type(current_expected_output)}."
|
205 |
)
|