commit: 31950d58c54ab9c23f1b5487ab9db2d0b3c5aaec
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 6 14:03:59 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Nov 6 14:06:27 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31950d58
dev-python/qiskit-terra: Use EPYTEST_*, fix tests
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../qiskit-terra/qiskit-terra-0.22.0-r1.ebuild | 25 ++++++++++------------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/dev-python/qiskit-terra/qiskit-terra-0.22.0-r1.ebuild
b/dev-python/qiskit-terra/qiskit-terra-0.22.0-r1.ebuild
index fd442eceacd3..b25eb56cf16e 100644
--- a/dev-python/qiskit-terra/qiskit-terra-0.22.0-r1.ebuild
+++ b/dev-python/qiskit-terra/qiskit-terra-0.22.0-r1.ebuild
@@ -123,25 +123,22 @@ BDEPEND="
distutils_enable_tests pytest
-# Small issues with the tests.
-# qiskit.Aer module depends on qiskit-terra, it cannot be used,
-# and an exact comparison of float switched to approximate comparison.
-#PATCHES=( "${FILESDIR}/qiskit-terra-0.19.2-test-corrections.patch" )
-
src_prepare() {
find -name '*.py' -exec sed -i -e 's:retworkx:rustworkx:' {} + || die
distutils-r1_src_prepare
}
python_test() {
- # We have to hide the source code directory so tests
- # do not use these, but instead the compiled library.
- mv qiskit qiskit.hidden || die
-
- # Some small tests are failing which test optional features.
- # Why they fail is still under investigation.
- # transpiler_equivalence tests take too long time, they are also
skipped.
- epytest -n "$(makeopts_jobs)" -k 'not (TestOptions and test_copy) and
not TestUnitarySynthesisPlugin and not test_transpiler_equivalence and not
(TestPauliSumOp and test_to_instruction)'
+ local EPYTEST_DESELECT=(
+ # TODO
+
test/python/transpiler/test_unitary_synthesis_plugin.py::TestUnitarySynthesisPlugin
+
test/python/transpiler/test_unitary_synthesis.py::TestUnitarySynthesis::test_two_qubit_synthesis_not_pulse_optimal
+ )
+ local EPYTEST_IGNORE=(
+ # TODO, also apparently slow
+ test/randomized/test_transpiler_equivalence.py
+ )
- mv qiskit.hidden qiskit || die
+ rm -rf qiskit || die
+ epytest -p xdist -n "$(makeopts_jobs)"
}