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

Update lint-python.yaml and fix code formatting in ... #165

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/lint-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches:
- main
- staging
pull_request:
branches:
- main
- staging

jobs:
flake8-lint:
Expand Down
5 changes: 2 additions & 3 deletions tests/markets/conftest.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import pytest
import json
from brownie import (
Contract, OverlayV1Token, OverlayV1Market, OverlayV1Factory,
OverlayV1FeedFactoryMock,
OverlayV1FeedMock, OverlayV1Deployer, web3,
OverlayV1ChainlinkFeed, OverlayV1ChainlinkFeedFactory
OverlayV1FeedMock, OverlayV1Deployer, web3
)


Expand Down Expand Up @@ -118,6 +116,7 @@ def feed_factory():
# to be used as example - deployed OverlayV1ChainlinkFeedFactory
yield Contract.from_explorer("0x92ee7A26Dbc18E9C0157831d79C2906A02fD1FAe")


@pytest.fixture(scope="module")
def feed():
# to be used as example - deployed CS2 feed
Expand Down
2 changes: 1 addition & 1 deletion tests/markets/test_oi_cap.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_cap_notional_adjusted_for_bounds(market, feed):

# expect is the min of all cap quantities
expect = min(cap_notional, cap_notional_front_run_bound,
cap_notional_back_run_bound)
cap_notional_back_run_bound)
actual = market.capNotionalAdjustedForBounds(data, cap_notional)
assert actual == expect

Expand Down
12 changes: 10 additions & 2 deletions tests/token/test_mint_burn.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@


def test_only_minter_on_mint(token, alice, bob):
EXPECTED_ERROR_MSG = 'AccessControl: account 0x33a4622b82d4c04a53e170c638b944ce27cffce3 is missing role 0xf0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc9'
EXPECTED_ERROR_MSG = (
'AccessControl: account 0x33a4622b82d4c04a53e170c638b944ce27cffce3 '
'is missing role '
'0xf0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc9'
)
with brownie.reverts(EXPECTED_ERROR_MSG):
token.mint(bob, 1 * 10 ** token.decimals(), {"from": alice})


def test_only_burner_on_burn(token, alice):
EXPECTED_ERROR_MSG = 'AccessControl: account 0x33a4622b82d4c04a53e170c638b944ce27cffce3 is missing role 0x9667e80708b6eeeb0053fa0cca44e028ff548e2a9f029edfeac87c118b08b7c8'
EXPECTED_ERROR_MSG = (
'AccessControl: account 0x33a4622b82d4c04a53e170c638b944ce27cffce3 '
'is missing role '
'0x9667e80708b6eeeb0053fa0cca44e028ff548e2a9f029edfeac87c118b08b7c8'
)
with brownie.reverts(EXPECTED_ERROR_MSG):
token.burn(1 * 10 ** token.decimals(), {"from": alice})

Expand Down
Loading