Skip to content

Commit b814568

Browse files
authored
Merge pull request #152 from ev-br/pre-release-test
Add a pre-release CI job
2 parents c091ccd + aeca59a commit b814568

File tree

5 files changed

+2038
-962
lines changed

5 files changed

+2038
-962
lines changed

.github/workflows/pip.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
python-version: ['3.10', '3.11']
1919
os: [ubuntu-latest]
2020
pytest: ['"pytest<8.0"', pytest]
21+
pre: ['', '--pre']
2122

2223
steps:
2324
# actions/setup-python@v5 has built-in functionality for caching and restoring dependencies.
@@ -32,8 +33,13 @@ jobs:
3233
- name: Install core dependencies
3334
run: |
3435
python -m pip install --upgrade pip
35-
python -m pip install ${{matrix.pytest}}
36-
python -m pip install -e .
36+
python -m pip install ${{matrix.pytest}} ${{matrix.pre}}
37+
python -m pip install -e . ${{matrix.pre}}
38+
39+
- name: Echo versions
40+
run: |
41+
python -m pytest --version
42+
python -c"import numpy; print(f'{numpy.__version__ = }')"
3743
3844
# Run self-tests without Scipy and MPL
3945
# Tests that require Scipy and MPL will be skipped
@@ -61,7 +67,7 @@ jobs:
6167
6268
- name: Test testfile CLI
6369
run: |
64-
python -m scpdt ./scpdt/tests/scipy_linalg_tutorial_clone.rst -v
70+
python -m scpdt ./scpdt/tests/scipy_ndimage_tutorial_clone.rst -v
6571
6672
- name: Run testmod a scipy submodule
6773
run: |

scpdt/tests/module_cases.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
'func7', 'manip_printoptions', 'array_abbreviation'
44
]
55

6+
import numpy as np
7+
import pytest
8+
69
def func():
710
"""
811
>>> 2 / 3
@@ -171,16 +174,19 @@ def nan_equal():
171174
>>> import numpy as np
172175
>>> np.nan
173176
np.float64(nan)
177+
"""
174178

179+
180+
def test_cmplx_nan():
181+
"""
175182
Complex nans
183+
>>> import numpy as np
176184
>>> np.nan - 1j*np.nan
177185
nan + nanj
178186
179187
>>> np.nan + 1j*np.nan
180188
np.complex128(nan+nanj)
181189
182-
Throw in infs, for a good measure
183-
>>> np.inf + 1j*np.inf
184-
inf + infj
185-
190+
>>> 1j*np.complex128(np.nan)
191+
np.complex128(nan+nanj)
186192
"""

0 commit comments

Comments
 (0)