Skip to content

Commit 6308ba2

Browse files
AmintorDuskovincentmr
authored andcommitted
Pin pytest version (#624)
* update dev version * update changelog * pin pytest version in requirement files * add a requirements file for tests against Pennylane master * update wheels' workflows
1 parent 60aef32 commit 6308ba2

9 files changed

+17
-22
lines changed

.github/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@
8484
* Fix apply state vector when using a Lightning handle.
8585
[(#622)](https://github.com/PennyLaneAI/pennylane-lightning/pull/622)
8686

87+
* Pinning Pytest to a version compatible with Flaky.
88+
[(#624)](https://github.com/PennyLaneAI/pennylane-lightning/pull/624)
89+
8790
### Contributors
8891

8992
This release contains contributions from (in alphabetical order):

.github/workflows/wheel_linux_aarch64.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,8 @@ jobs:
139139

140140
CIBW_BUILD_VERBOSITY: 3
141141

142-
CIBW_TEST_REQUIRES: pytest pytest-cov pytest-mock flaky
143-
144142
CIBW_BEFORE_TEST: |
145-
python -m pip install pytest-benchmark git+https://github.com/PennyLaneAI/pennylane.git@master
143+
python -m pip install -r requirements-tests.txt
146144
if ${{ matrix.pl_backend == 'lightning_kokkos'}}; then SKIP_COMPILATION=True PL_BACKEND="lightning_qubit" pip install -e . -vv; fi
147145
148146
CIBW_TEST_COMMAND: |

.github/workflows/wheel_linux_x86_64.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,8 @@ jobs:
149149
PATH="/opt/rh/devtoolset-11/root/usr/bin:$PATH" \
150150
PL_BACKEND="${{ matrix.pl_backend }}"
151151
152-
# Testing of built wheels
153-
CIBW_TEST_REQUIRES: pytest pytest-cov pytest-mock flaky
154-
155152
CIBW_BEFORE_TEST: |
156-
python -m pip install pytest-benchmark git+https://github.com/PennyLaneAI/pennylane.git@master
153+
python -m pip install -r requirements-tests.txt
157154
if ${{ matrix.pl_backend == 'lightning_kokkos'}}; then SKIP_COMPILATION=True PL_BACKEND="lightning_qubit" pip install -e . -vv; fi
158155
159156
CIBW_TEST_COMMAND: |

.github/workflows/wheel_macos_arm64.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,8 @@ jobs:
8989
CMAKE_ARGS="-DCMAKE_CXX_COMPILER_TARGET=arm64-apple-macos11 -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_SYSTEM_PROCESSOR=ARM64 -DENABLE_OPENMP=OFF" \
9090
PL_BACKEND="${{ matrix.pl_backend }}"
9191
92-
# Testing of built wheels
93-
CIBW_TEST_REQUIRES: pytest pytest-cov pytest-mock flaky
94-
9592
CIBW_BEFORE_TEST: |
96-
python -m pip install pytest-benchmark git+https://github.com/PennyLaneAI/pennylane.git@master
93+
python -m pip install -r requirements-tests.txt
9794
if ${{ matrix.pl_backend == 'lightning_kokkos'}}; then SKIP_COMPILATION=True PL_BACKEND="lightning_qubit" pip install -e . -vv; fi
9895
9996
CIBW_TEST_COMMAND: |

.github/workflows/wheel_macos_x86_64.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ concurrency:
2121
cancel-in-progress: true
2222

2323
jobs:
24-
set_wheel_build_matrix:
24+
set_wheel_build_matrix:
2525
name: "Set wheel build matrix"
2626
uses: ./.github/workflows/set_wheel_build_matrix.yml
2727
with:
@@ -137,11 +137,8 @@ jobs:
137137
138138
PL_BACKEND: ${{ matrix.pl_backend }}
139139

140-
# Testing of built wheels
141-
CIBW_TEST_REQUIRES: pytest pytest-cov pytest-mock flaky
142-
143140
CIBW_BEFORE_TEST: |
144-
python -m pip install pytest-benchmark git+https://github.com/PennyLaneAI/pennylane.git@master
141+
python -m pip install -r requirements-tests.txt
145142
if ${{ matrix.pl_backend == 'lightning_kokkos'}}; then SKIP_COMPILATION=True PL_BACKEND="lightning_qubit" pip install -e . -vv; fi
146143
147144
CIBW_TEST_COMMAND: |

.github/workflows/wheel_win_x86_64.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,8 @@ jobs:
126126
CIBW_BEFORE_BUILD: |
127127
python -m pip install pybind11 cmake~=3.24.0 build
128128
129-
# Testing of built wheels
130-
CIBW_TEST_REQUIRES: pytest pytest-cov pytest-mock flaky
131-
132129
CIBW_BEFORE_TEST: |
133-
python -m pip install pytest-benchmark git+https://github.com/PennyLaneAI/pennylane.git@master
130+
python -m pip install -r requirements-tests.txt
134131
135132
CIBW_TEST_COMMAND: |
136133
pl-device-test --device=lightning.qubit --skip-ops -x --tb=short --no-flaky-report

requirements-dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ git+https://github.com/PennyLaneAI/pennylane.git@master
33
ninja
44
flaky
55
pybind11
6-
pytest
6+
pytest~=8.0.0
77
pytest-benchmark
88
pytest-cov
99
pytest-mock

requirements-tests.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pytest~=8.0.0
2+
pytest-cov
3+
pytest-mock
4+
flaky
5+
pytest-benchmark
6+
git+https://github.com/PennyLaneAI/pennylane.git@master

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ ninja
22
flaky
33
pennylane>=0.34
44
pybind11
5-
pytest
5+
pytest~=8.0.0
66
pytest-cov
77
pytest-mock

0 commit comments

Comments
 (0)