diff --git a/conftest.py b/conftest.py index 5e2b13dc..74f8a948 100644 --- a/conftest.py +++ b/conftest.py @@ -24,7 +24,7 @@ def pytest_addoption(parser): "--hypothesis-max-examples", "--max-examples", action="store", - default=None, + default=100, help="set the Hypothesis max_examples setting", ) # Hypothesis deadline @@ -155,7 +155,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") or 50)) + unvectorized_max_examples = math.ceil(math.log(int(config.getoption("--hypothesis-max-examples")) or 50)) # 2. Iterate through items and apply markers accordingly # ------------------------------------------------------ @@ -239,4 +239,4 @@ def pytest_collection_modifyitems(config, items): f"{f_bad_ids}\n" f"(xfails file: {xfails_file})\n" f"{bad_ids_end_msg}" - ) \ No newline at end of file + )