diff --git a/.github/workflows/_test_futures_private.yaml b/.github/workflows/_test_futures_private.yaml index a578ea9d..95148a03 100644 --- a/.github/workflows/_test_futures_private.yaml +++ b/.github/workflows/_test_futures_private.yaml @@ -59,7 +59,7 @@ jobs: FUTURES_SECRET_KEY: ${{ secrets.FUTURES_SECRET_KEY }} FUTURES_SANDBOX_KEY: ${{ secrets.FUTURES_SANDBOX_KEY }} FUTURES_SANDBOX_SECRET: ${{ secrets.FUTURES_SANDBOX_SECRET }} - run: pytest -vv -m "futures_auth and not futures_websocket" tests + run: pytest -vv -m "futures_auth and not futures_websocket and not flaky" tests ## Unit tests of the Futures websocket client ## @@ -69,4 +69,4 @@ jobs: FUTURES_SECRET_KEY: ${{ secrets.FUTURES_SECRET_KEY }} FUTURES_SANDBOX_KEY: ${{ secrets.FUTURES_SANDBOX_KEY }} FUTURES_SANDBOX_SECRET: ${{ secrets.FUTURES_SANDBOX_SECRET }} - run: pytest -vv -m futures_websocket tests + run: pytest -vv -m "futures_websocket and not flaky" tests diff --git a/pyproject.toml b/pyproject.toml index 1eeb1925..18699c47 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,6 +84,7 @@ testpaths = ["tests"] cache_dir = ".cache/pytest" markers = [ "wip: Used to run a specific test by hand.", + "flaky: Flaky tests", "spot: … Spot endpoint.", "spot_auth: … authenticated Spot endpoint.", "spot_trade: … Spot Trade endpoint.", diff --git a/tests/futures/test_futures_user.py b/tests/futures/test_futures_user.py index efdefc86..f81ef02c 100644 --- a/tests/futures/test_futures_user.py +++ b/tests/futures/test_futures_user.py @@ -61,6 +61,7 @@ def test_get_notifications(futures_auth_user: User) -> None: assert is_success(futures_auth_user.get_notifications()) +@pytest.mark.flaky() @pytest.mark.futures() @pytest.mark.futures_auth() @pytest.mark.futures_user() @@ -75,6 +76,8 @@ def test_get_account_log(futures_auth_user: User) -> None: ) +# FIXME: They often encounter 500 status_codes - maybe an error in Kraken's API +@pytest.mark.flaky() @pytest.mark.futures() @pytest.mark.futures_auth() @pytest.mark.futures_user() @@ -94,6 +97,8 @@ def test_get_account_log_csv(futures_auth_user: User) -> None: file.write(chunk) +# FIXME: They often encounter 500 status_codes - maybe an error in Kraken's API +@pytest.mark.flaky() @pytest.mark.futures() @pytest.mark.futures_auth() @pytest.mark.futures_user() @@ -112,7 +117,8 @@ def test_get_execution_events(futures_auth_user: User) -> None: assert "elements" in result -@pytest.mark.wip() +# FIXME: They often encounter 500 status_codes - maybe an error in Kraken's API +@pytest.mark.flaky() @pytest.mark.futures() @pytest.mark.futures_auth() @pytest.mark.futures_user()