diff --git a/.github/workflows/lint-python.yaml b/.github/workflows/lint-python.yaml index e2673879..c2caf9e5 100644 --- a/.github/workflows/lint-python.yaml +++ b/.github/workflows/lint-python.yaml @@ -4,9 +4,11 @@ on: push: branches: - main + - staging pull_request: branches: - main + - staging jobs: flake8-lint: diff --git a/tests/markets/conftest.py b/tests/markets/conftest.py index 8caa4ae5..dce4f5a1 100644 --- a/tests/markets/conftest.py +++ b/tests/markets/conftest.py @@ -1,10 +1,8 @@ import pytest -import json from brownie import ( Contract, OverlayV1Token, OverlayV1Market, OverlayV1Factory, OverlayV1FeedFactoryMock, - OverlayV1FeedMock, OverlayV1Deployer, web3, - OverlayV1ChainlinkFeed, OverlayV1ChainlinkFeedFactory + OverlayV1FeedMock, OverlayV1Deployer, web3 ) @@ -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 diff --git a/tests/markets/test_oi_cap.py b/tests/markets/test_oi_cap.py index bed5eeae..75bc735f 100644 --- a/tests/markets/test_oi_cap.py +++ b/tests/markets/test_oi_cap.py @@ -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 diff --git a/tests/token/test_mint_burn.py b/tests/token/test_mint_burn.py index 4d857ba6..c9ecbb97 100644 --- a/tests/token/test_mint_burn.py +++ b/tests/token/test_mint_burn.py @@ -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})