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

Unwind oi tests #87

Open
wants to merge 2 commits into
base: main-archive
Choose a base branch
from
Open

Unwind oi tests #87

wants to merge 2 commits into from

Conversation

0xparashar
Copy link
Contributor

No description provided.

tests/markets/test_funding.py Show resolved Hide resolved
tests/markets/utils.py Outdated Show resolved Hide resolved
@@ -71,17 +72,42 @@ def test_unwind_updates_position(market, feed, alice, rando, ovl,
# Use update() to update state to query values for checks vs expected
# after unwind.
# NOTE: update() tests in test_update.py
oi_long = Decimal(market.oiLong())
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like these 2 lines are not required

Copy link
Contributor

Choose a reason for hiding this comment

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

This should be fixed in other tests too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need previous oi long & oi short to calculate new oi long and oi short, so was caching these values before calling update on market as on Line 100 you can see

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.

2 participants