DPNLPF-1299: sdk_answer now returns synced random values#214
Open
DPNLPF-1299: sdk_answer now returns synced random values#214
Conversation
SyrexMinus
previously approved these changes
Mar 15, 2022
Collaborator
There was a problem hiding this comment.
Я потестил на аппе. Ответы всегда синхронны, если одинаковое количество ответов и в pronounce_text и bubble. Если количество ответов разное, то синхронизация работает не всегда. Но это предусмотрено остатком от деления, так что функционал корректен.
intsynko
approved these changes
Apr 1, 2022
intsynko
suggested changes
Apr 1, 2022
| self.assertTrue(str(result[0].raw) in expect_arr) | ||
| self.assertFalse(str(result[0].raw) in not_expect_arr) | ||
|
|
||
|
|
Collaborator
There was a problem hiding this comment.
добавить сюда еще один метод теста "test_sync_random":
на вход:
{
"pronounceText": ["pronounceText1", "pronounceText2"],
"items": [
{
"bubble": {
"text": ["Text1", "Text2"]
}
},
...
}}
если выбрался pronounceText1 - то должен выбраться Text1 из бабла и ананлогично со вторым
Collaborator
Author
There was a problem hiding this comment.
Так вроде сейчас тесты так и работают. not_expect_arr же для этого добавил
SyrexMinus
approved these changes
Apr 7, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bubble и pronounceText (и др.) теперь рандомятся синхронно, если количество не совпадает, то берется остаток от деления