Skip to content

Commit b4c5bd7

Browse files
committed
Skips filtering numeric hypothesis tests
numpy v1 has bugs with comparing int64 and uint64 (e.g. numpy/numpy#12525) Our hypothesis tests were flaking catching these bugs in numpy. Now we skip the tests which do such comparisons if we're using numpy==1.x
1 parent 36cc583 commit b4c5bd7

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

‎python/arcticdb/util/_versions.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
IS_PANDAS_ZERO = PANDAS_VERSION < version.Version("1.0")
1616
IS_PANDAS_ONE = PANDAS_VERSION >= version.Version("1.0") and PANDAS_VERSION < version.Version("2.0")
1717
IS_PANDAS_TWO = PANDAS_VERSION >= version.Version("2.0")
18-
IS_NUMPY_TWO = (version.parse(np.__version__) >= version.Version("2.0")) and (
19-
version.parse(np.__version__) < version.Version("3.0")
20-
)
18+
NUMPY_VERSION = version.parse(np.__version__)
19+
IS_NUMPY_ONE = NUMPY_VERSION >= version.Version("1.0") and NUMPY_VERSION < version.Version("2.0")
20+
IS_NUMPY_TWO = NUMPY_VERSION >= version.Version("2.0") and NUMPY_VERSION < version.Version("3.0")

‎python/tests/unit/arcticdb/version_store/test_filtering_hypothesis.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,16 @@
3636
dataframe_strategy,
3737
column_strategy,
3838
)
39+
from arcticdb.util._versions import IS_NUMPY_ONE
3940

4041

4142
pytestmark = pytest.mark.pipeline
4243

4344

45+
@pytest.mark.skipif(
46+
IS_NUMPY_ONE,
47+
reason="numpy==1.x has bugs with comparing int64 and uint64 (e.g. here https://github.com/numpy/numpy/issues/12525)",
48+
)
4449
@use_of_function_scoped_fixtures_in_hypothesis_checked
4550
@settings(deadline=None)
4651
@given(
@@ -330,6 +335,10 @@ def test_filter_with_column_slicing(lmdb_version_store_tiny_segment, df):
330335
##################################
331336

332337

338+
@pytest.mark.skipif(
339+
IS_NUMPY_ONE,
340+
reason="numpy==1.x has bugs with comparing int64 and uint64 (e.g. here https://github.com/numpy/numpy/issues/12525)",
341+
)
333342
@use_of_function_scoped_fixtures_in_hypothesis_checked
334343
@settings(deadline=None)
335344
@given(

0 commit comments

Comments
 (0)