From 5818ec14c44471170bcf45d9009471fbcdefc300 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Fri, 19 Apr 2024 13:41:21 -0600 Subject: [PATCH 1/3] Reset the max-examples default back to 100 The tests run fast enough now that there's no need to lower this to 20. See the discussion at #246. --- conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conftest.py b/conftest.py index 4952bcee..85d5e692 100644 --- a/conftest.py +++ b/conftest.py @@ -23,7 +23,7 @@ def pytest_addoption(parser): "--hypothesis-max-examples", "--max-examples", action="store", - default=20, + default=100, type=int, help="set the Hypothesis max_examples setting", ) From 3e9f8a6f6d46dc7a4833532a8eb7017e98e0aeb1 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Wed, 5 Jun 2024 16:39:34 -0600 Subject: [PATCH 2/3] Use max_examples/10 for unvectorized_max_examples Previously it was log(max_examples), but this makes it very difficult to actually run a lot of examples by increasing max_examples. --- conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conftest.py b/conftest.py index 85d5e692..49f3507a 100644 --- a/conftest.py +++ b/conftest.py @@ -148,7 +148,7 @@ def pytest_collection_modifyitems(config, items): disabled_exts = config.getoption("--disable-extension") disabled_dds = config.getoption("--disable-data-dependent-shapes") - unvectorized_max_examples = math.ceil(math.log(config.getoption("--hypothesis-max-examples"))) + unvectorized_max_examples = config.getoption("--hypothesis-max-examples")//10 # 2. Iterate through items and apply markers accordingly # ------------------------------------------------------ From 781353b4b2b0c0d1c627f1a21de9f80aa984e351 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Wed, 5 Jun 2024 16:42:29 -0600 Subject: [PATCH 3/3] Remove unused import --- conftest.py | 1 - 1 file changed, 1 deletion(-) diff --git a/conftest.py b/conftest.py index 49f3507a..dcb5ea27 100644 --- a/conftest.py +++ b/conftest.py @@ -1,7 +1,6 @@ from functools import lru_cache from pathlib import Path import argparse -import math import warnings import os