From 98f2a911a1b7b0d10a201171f0e800f3cddd583b Mon Sep 17 00:00:00 2001 From: Jake VanderPlas Date: Tue, 6 Aug 2024 12:53:36 -0700 Subject: [PATCH] Fix unvectorized_max_examples in conftest.py If max_examples<10, then max_examples // 10 is zero, which results in an error. --- conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conftest.py b/conftest.py index c315fd82..7fbea5f8 100644 --- a/conftest.py +++ b/conftest.py @@ -180,7 +180,7 @@ def pytest_collection_modifyitems(config, items): disabled_exts = config.getoption("--disable-extension") disabled_dds = config.getoption("--disable-data-dependent-shapes") - unvectorized_max_examples = config.getoption("--hypothesis-max-examples")//10 + unvectorized_max_examples = max(1, config.getoption("--hypothesis-max-examples")//10) # 2. Iterate through items and apply markers accordingly # ------------------------------------------------------