Skip to content

Commit 2a884fa

Browse files
committed
Sanity check for MIN_VER_FOR_COMPLEX
1 parent 927b80a commit 2a884fa

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

hypothesis-python/tests/array_api/common.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313

1414
import pytest
1515

16-
from hypothesis.extra.array_api import COMPLEX_NAMES, REAL_NAMES, NominalVersion
16+
from hypothesis.extra.array_api import (
17+
COMPLEX_NAMES,
18+
REAL_NAMES,
19+
RELEASED_VERSIONS,
20+
NominalVersion,
21+
)
1722
from hypothesis.internal.floats import next_up
1823

1924
__all__ = [
@@ -24,8 +29,10 @@
2429
]
2530

2631

27-
# This should be updated for when a released version includes complex numbers
32+
# This should be updated to the next spec release, which should include complex numbers
2833
MIN_VER_FOR_COMPLEX: NominalVersion = "draft"
34+
if len(RELEASED_VERSIONS) > 1:
35+
assert MIN_VER_FOR_COMPLEX == RELEASED_VERSIONS[1]
2936

3037

3138
def installed_array_modules() -> Dict[str, EntryPoint]:

0 commit comments

Comments
 (0)