Skip to content
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

Burn Transaction Test + Refactors in Basic #627

Merged
merged 47 commits into from
Dec 13, 2022
Merged

Conversation

cxloe
Copy link
Contributor

@cxloe cxloe commented Dec 8, 2022

Soundtrack to this PR

Motivation

Integration test coverage for Burn Transactions. Working towards standard, reusable, relatively parsable testing helper functions.

In this PR

  • Short test for burn transactions. Follows roughly the same convention as previous tests, but with less duplicated code.
  • Renamed and refactored utility functions. TestUtils class ( to be moved out of basic later. )
  • Namely, functions that wait for all accounts to sync, and a function that waits two blocks. Those may be redundant but it's what i ended up with..
  • Some clearer named variables.
  • accounts.py is a script i ended up writing to print the ID, balance and entropy of all my imported FS accounts.
  • More typing for fullservice.py
  • pytest compatibility for basic.py and burn_transaction_test.py

Test Plan

poetry run python burn_transaction_test.py

To Do

Make sure async def wait_for_account_sync(): works right.

Future Work

  • Get things organized! Pull out TestUtils into it's own file, and sort out the folder structure.
  • ( in a sarcastic tone of voice ) DATACLASSES SO I NEVER HAVE TO INVOKE .get EVER AGAIN IN MY LIFE I S2G IF I SEE ANOTHER NoneType ERR-

@cxloe cxloe requested a review from a team December 8, 2022 02:10
@cxloe cxloe marked this pull request as ready for review December 8, 2022 02:11
.internal-ci/test/fs-integration/basic.py Outdated Show resolved Hide resolved
@cxloe cxloe requested a review from a team December 8, 2022 18:17
@cxloe cxloe force-pushed the zd/burn_transaction_test branch 2 times, most recently from 914dfcd to 84273bb Compare December 8, 2022 18:54
pouneh
pouneh previously requested changes Dec 8, 2022
Copy link
Contributor

@pouneh pouneh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes most sense for burn_transaction_test.py to live with the other integration tests and not under python-library

@cxloe
Copy link
Contributor Author

cxloe commented Dec 9, 2022

I think it makes most sense for burn_transaction_test.py to live with the other integration tests and not under python-library

Folder structure is out of scope for this, will revisit in a later PR. I think python-library/integration-tests makes sense. CI will be able to invoke whatever tests it's configured to run by importing from the same place it needs to import fullservice.py

@cxloe cxloe requested review from pouneh and a team December 9, 2022 00:37
* seeing what needs to change..

* revert globals

* seems to work!

* instanciate testutils
@cxloe cxloe marked this pull request as draft December 12, 2022 22:05
@cxloe cxloe marked this pull request as ready for review December 12, 2022 22:27
@cxloe cxloe dismissed pouneh’s stale review December 12, 2022 22:42

no change was suggested

Copy link

@queenbdubs queenbdubs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just had questions as I'm learning about all this

@cxloe cxloe merged commit c2e872f into develop Dec 13, 2022
@cxloe cxloe deleted the zd/burn_transaction_test branch December 13, 2022 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants