Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/qiskit-terra/
Date: Sun, 06 Nov 2022 14:06:34
Message-Id: 1667743587.31950d58c54ab9c23f1b5487ab9db2d0b3c5aaec.mgorny@gentoo
1 commit: 31950d58c54ab9c23f1b5487ab9db2d0b3c5aaec
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 6 14:03:59 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 6 14:06:27 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31950d58
7
8 dev-python/qiskit-terra: Use EPYTEST_*, fix tests
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 .../qiskit-terra/qiskit-terra-0.22.0-r1.ebuild | 25 ++++++++++------------
13 1 file changed, 11 insertions(+), 14 deletions(-)
14
15 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
16 index fd442eceacd3..b25eb56cf16e 100644
17 --- a/dev-python/qiskit-terra/qiskit-terra-0.22.0-r1.ebuild
18 +++ b/dev-python/qiskit-terra/qiskit-terra-0.22.0-r1.ebuild
19 @@ -123,25 +123,22 @@ BDEPEND="
20
21 distutils_enable_tests pytest
22
23 -# Small issues with the tests.
24 -# qiskit.Aer module depends on qiskit-terra, it cannot be used,
25 -# and an exact comparison of float switched to approximate comparison.
26 -#PATCHES=( "${FILESDIR}/qiskit-terra-0.19.2-test-corrections.patch" )
27 -
28 src_prepare() {
29 find -name '*.py' -exec sed -i -e 's:retworkx:rustworkx:' {} + || die
30 distutils-r1_src_prepare
31 }
32
33 python_test() {
34 - # We have to hide the source code directory so tests
35 - # do not use these, but instead the compiled library.
36 - mv qiskit qiskit.hidden || die
37 -
38 - # Some small tests are failing which test optional features.
39 - # Why they fail is still under investigation.
40 - # transpiler_equivalence tests take too long time, they are also skipped.
41 - 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)'
42 + local EPYTEST_DESELECT=(
43 + # TODO
44 + test/python/transpiler/test_unitary_synthesis_plugin.py::TestUnitarySynthesisPlugin
45 + test/python/transpiler/test_unitary_synthesis.py::TestUnitarySynthesis::test_two_qubit_synthesis_not_pulse_optimal
46 + )
47 + local EPYTEST_IGNORE=(
48 + # TODO, also apparently slow
49 + test/randomized/test_transpiler_equivalence.py
50 + )
51
52 - mv qiskit.hidden qiskit || die
53 + rm -rf qiskit || die
54 + epytest -p xdist -n "$(makeopts_jobs)"
55 }