-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test script for check_stop_trading_abci #308
test script for check_stop_trading_abci #308
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add a test for the SynchronizedData
?
Sure, no problem. I will do it.
…On Fri, Aug 9, 2024 at 2:32 PM Adamantios Zaras ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Could you also add a test for the SynchronizedData?
—
Reply to this email directly, view it on GitHub
<#308 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BKA53YZA6QA4Q7SFLFAYBODZQSARRAVCNFSM6AAAAABMGZP2KGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDEMRZG4YTSMRRGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
42beace
to
f065bbe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is uncovered code:
- In check stop trading: synced data
- In staking: synced data and end block in CallCheckpointRound
- In multiplexer: end block in PostTxSettlementRound
1. In check_stop_trading_abci: added test_synchronize_data_initialization
line 128.
2. For staking added end block from line 91. Will change the name of
test_call_checkpoint_round as I implement end block in it.
3. Same for tx settlement , from line 96 added end block in
test_post_tx_settlement_round_end_block.
Let me know if I am missing something.
Thank you.
…On Fri, 9 Aug, 2024, 10:41 pm Adamantios Zaras, ***@***.***> wrote:
***@***.**** requested changes on this pull request.
There is uncovered code:
- In check stop trading: synced data
- In staking: synced data and end block in CallCheckpointRound
- In multiplexer: end block in PostTxSettlementRound
—
Reply to this email directly, view it on GitHub
<#308 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BKA53Y67KPHW27IBBRCEA3TZQTZ5ZAVCNFSM6AAAAABMGZP2KGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDEMZQGY4DQMRRGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
eabb2f4
to
e23a7d6
Compare
|
||
|
||
|
||
def test_check_stop_trading_round_initialization(synchronized_data): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests should also check whether we can run the rounds and that for every potential execution branch we get the expected data and event. Check this for some inspiration: https://github.com/valory-xyz/IEKit/blob/main/packages/valory/skills/dynamic_nft_abci/tests/test_rounds.py#L125
Thanks, I'll check it out and make changes accordingly.
…On Tue, 13 Aug, 2024, 7:51 pm David Vilela, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In packages/valory/skills/check_stop_trading_abci/tests/test_rounds.py
<#308 (comment)>:
> +
+
***@***.***
+def abci_app():
+ """Fixture to get the ABCI app with necessary parameters."""
+ # Create mocks for the required parameters
+ synchronized_data = MagicMock()
+ logger = MagicMock()
+ context = MagicMock()
+
+ # Instantiate CheckStopTradingAbciApp with mocked parameters
+ return CheckStopTradingAbciApp(synchronized_data=synchronized_data, logger=logger, context=context)
+
+
+
+def test_check_stop_trading_round_initialization(synchronized_data):
These tests should also check whether we can run the rounds and that for
every potential execution branch we get the expected data and event. Check
this for some inspiration:
https://github.com/valory-xyz/IEKit/blob/main/packages/valory/skills/dynamic_nft_abci/tests/test_rounds.py#L125
—
Reply to this email directly, view it on GitHub
<#308 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BKA53Y23X4FY5XLT2ZKF7VTZRIJABAVCNFSM6AAAAABMGZP2KGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDEMZVG4YTCMZQGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
||
def test_update_bets_round_execution(self): | ||
"""Test the execution of UpdateBetsRound.""" | ||
test_case = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally these test cases are parametrized. See here: https://github.com/valory-xyz/IEKit/blob/main/packages/valory/skills/dynamic_nft_abci/tests/test_rounds.py#L160
This is branch for testing script for rounds and dialogues.