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

Fix/lint to pytest #142

Merged
merged 2 commits into from
Nov 5, 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: 1 addition & 1 deletion docs/source/core_concepts/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ And run all your tests with ``mox test``, to get an output like:

This is the most basic setup for testing.

You can additionally use [pytest-xdist](https://pytest-xdist.readthedocs.io/en/stable/) to run your tests in a multi-threaded environment.
You can additionally use `pytest-xdist <https://pytest-xdist.readthedocs.io/en/stable/>`_ to run your tests in a multi-threaded environment.

.. code-block:: console

Expand Down
2 changes: 2 additions & 0 deletions tests/data/tests_project/script/deploy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from src import Counter

from moccasin.boa_tools import VyperContract

# from boa.contracts.vyper.vyper_contract import VyperContract

def deploy() -> VyperContract:
Expand Down
1 change: 1 addition & 0 deletions tests/data/tests_project/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from script.deploy import deploy


@pytest.fixture
def counter_contract():
return deploy()
7 changes: 2 additions & 5 deletions tests/data/tests_project/tests/test_fuzz_counter.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import boa
from hypothesis import assume, settings
from hypothesis import strategies as st
from hypothesis.stateful import RuleBasedStateMachine, initialize, invariant, rule
from boa.test.strategies import strategy

from hypothesis import assume, settings
from hypothesis.stateful import RuleBasedStateMachine, initialize, rule
from script.deploy import deploy

MAX_UINT256 = 2**256 - 1
Expand Down