diff --git a/.github/workflows/braket-latest-pl-stable.yml b/.github/workflows/braket-latest-pl-stable.yml index 7c35b82c..17963a35 100644 --- a/.github/workflows/braket-latest-pl-stable.yml +++ b/.github/workflows/braket-latest-pl-stable.yml @@ -46,9 +46,4 @@ jobs: df -h - name: Run PennyLane device integration tests run: | - if ! [ -x "$(command -v pl-device-test)" ]; then - echo 'Error: Version of PennyLane does not provide device integration tests.' >&2 - else - pl-device-test --device=braket.local.qubit --tb=short --skip-ops --shots=20000 -k 'not no_0_shots' - pl-device-test --device=braket.local.qubit --tb=short --skip-ops -k 'not Sample and not no_0_shots' - fi + tox -e pennylane-device-tests diff --git a/tox.ini b/tox.ini index 8e923add..b5ee8bbc 100644 --- a/tox.ini +++ b/tox.ini @@ -27,6 +27,15 @@ commands = pytest test/integ_tests {posargs} extras = test +[testenv:pennylane-device-tests] +# {posargs} contains additional arguments specified when invoking tox. e.g. tox -- -s -k test_foo.py +deps = + {[test-deps]deps} +commands = + pl-device-test --device=braket.local.qubit --tb=short --skip-ops --shots=20000 -k 'not no_0_shots' + pl-device-test --device=braket.local.qubit --tb=short --skip-ops -k 'not Sample and not no_0_shots' +extras = test + [testenv:linters] basepython = python3 skip_install = true