Skip to content

Commit 7f60a66

Browse files
Fast Test Option Added
1 parent 2b403a5 commit 7f60a66

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,16 @@ format:
4545
# TEST COMMANDS
4646
# ============================================================================ #
4747

48-
test: ## run tests quickly with the default Python
48+
test: ## run tests
4949
pytest
5050

51+
test-fast: ## run tests quickly - only 1 hypothesis example per test
52+
pytest --hypothesis-profile fast
53+
5154
test-all: ## run tests on every Python version with tox
5255
tox
5356

54-
coverage: ## check code coverage quickly with the default Python
57+
coverage: ## check code coverage
5558
coverage run --source comp_bench_tools -m pytest
5659
coverage report -m
5760
coverage html

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
from pathlib import Path
44

55
import pytest
6+
from hypothesis import Verbosity
7+
from hypothesis import settings
68
from pytest_mock import MockerFixture
79

810
from tests.mocked_plugins import MockedEntryPoint
@@ -14,6 +16,10 @@
1416

1517
pytest.register_assert_rewrite("tests.utils")
1618

19+
settings.register_profile("fast", max_examples=1)
20+
settings.register_profile("debug", max_examples=1, verbosity=Verbosity.verbose, seed=1)
21+
settings.load_profile(os.getenv("HYPOTHESIS_PROFILE", "default"))
22+
1723

1824
@pytest.fixture(scope="session")
1925
def mocked_plugin_apis() -> list[str]:

0 commit comments

Comments
 (0)