Skip to content

Commit a8142f1

Browse files
authored
Constrain numpy in tests (#1203)
### Summary Numpy released a new version which has caused our tests to fail. See here for example in Terra: Qiskit/qiskit#10305 ### Details and comments This PR constrains the version of numpy in the tests. We will need to Qiskit to align with the new numpy.
1 parent a387675 commit a8142f1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

constraints.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Numpy 1.25 deprecated some behaviours that we used, and caused some
2+
# tests to flake. See https://github.com/Qiskit/qiskit-terra/issues/10305,
3+
# remove pin when resolving that.
4+
numpy<1.25

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ isolated_build = true
55

66
[testenv]
77
usedevelop = True
8-
install_command = pip install -U {opts} {packages}
8+
install_command = pip install -c{toxinidir}/constraints.txt -U {opts} {packages}
99
setenv =
1010
VIRTUAL_ENV={envdir}
1111
QISKIT_SUPPRESS_PACKAGING_WARNINGS=Y

0 commit comments

Comments
 (0)