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/openstacksdk/
Date: Wed, 23 Jun 2021 14:10:32
Message-Id: 1624457421.fca5983386fa0cc033a66eeabd36d2ca9d1b53f3.mgorny@gentoo
1 commit: fca5983386fa0cc033a66eeabd36d2ca9d1b53f3
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 23 14:03:10 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 23 14:10:21 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fca59833
7
8 dev-python/openstacksdk: Enable tests
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 .../openstacksdk/openstacksdk-0.50.0-r1.ebuild | 76 ++++++++++++++++++++++
13 1 file changed, 76 insertions(+)
14
15 diff --git a/dev-python/openstacksdk/openstacksdk-0.50.0-r1.ebuild b/dev-python/openstacksdk/openstacksdk-0.50.0-r1.ebuild
16 new file mode 100644
17 index 00000000000..94450d3174c
18 --- /dev/null
19 +++ b/dev-python/openstacksdk/openstacksdk-0.50.0-r1.ebuild
20 @@ -0,0 +1,76 @@
21 +# Copyright 1999-2021 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=7
25 +
26 +PYTHON_COMPAT=( python3_8 )
27 +inherit distutils-r1
28 +
29 +DESCRIPTION="A collection of libraries for building applications to work with OpenStack."
30 +HOMEPAGE="https://github.com/openstack/python-openstacksdk"
31 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
32 +
33 +LICENSE="Apache-2.0"
34 +SLOT="0"
35 +KEYWORDS="amd64 ~arm64 x86"
36 +IUSE=""
37 +
38 +CDEPEND=">=dev-python/pbr-2.0.0[${PYTHON_USEDEP}]
39 + !~dev-python/pbr-2.1.0"
40 +RDEPEND="${CDEPEND}
41 + >=dev-python/pyyaml-3.13[${PYTHON_USEDEP}]
42 + >=dev-python/appdirs-1.3.0[${PYTHON_USEDEP}]
43 + >=dev-python/requestsexceptions-1.2.0[${PYTHON_USEDEP}]
44 + >=dev-python/jsonpatch-1.16[${PYTHON_USEDEP}]
45 + !~dev-python/jsonpatch-1.20[${PYTHON_USEDEP}]
46 + >=dev-python/os-service-types-1.7.0[${PYTHON_USEDEP}]
47 + >=dev-python/keystoneauth-3.18.0[${PYTHON_USEDEP}]
48 + >=dev-python/munch-2.1.0[${PYTHON_USEDEP}]
49 + >=dev-python/decorator-4.4.1[${PYTHON_USEDEP}]
50 + >=dev-python/jmespath-0.9.0[${PYTHON_USEDEP}]
51 + >=dev-python/iso8601-0.1.11[${PYTHON_USEDEP}]
52 + >=dev-python/netifaces-0.10.4[${PYTHON_USEDEP}]
53 + >=dev-python/dogpile-cache-0.6.5[${PYTHON_USEDEP}]
54 + >=dev-python/cryptography-2.7.0[${PYTHON_USEDEP}]
55 + dev-python/importlib_metadata[${PYTHON_USEDEP}]
56 +"
57 +BDEPEND="${CDEPEND}
58 + test? (
59 + >=dev-python/ddt-1.0.1[${PYTHON_USEDEP}]
60 + >=dev-python/fixtures-3.0.0[${PYTHON_USEDEP}]
61 + >=dev-python/jsonschema-3.2.0[${PYTHON_USEDEP}]
62 + >=dev-python/prometheus_client-0.4.2[${PYTHON_USEDEP}]
63 + >=dev-python/oslo-config-6.1.0[${PYTHON_USEDEP}]
64 + >=dev-python/oslotest-3.2.0[${PYTHON_USEDEP}]
65 + >=dev-python/requests-mock-1.2.0[${PYTHON_USEDEP}]
66 + >=dev-python/statsd-3.3.0[${PYTHON_USEDEP}]
67 + >=dev-python/testscenarios-0.4[${PYTHON_USEDEP}]
68 + >=dev-python/testtools-2.2.0[${PYTHON_USEDEP}]
69 + )"
70 +
71 +distutils_enable_tests unittest
72 +
73 +python_test() {
74 + distutils_install_for_testing
75 + cd "${TEST_DIR}"/lib || die
76 +
77 + # broken with the current version of dogpile.cache?
78 + rm openstack/tests/unit/cloud/test_caching.py || die
79 +
80 + # TODO
81 + sed -e 's:test_generate_form:_&:' \
82 + -e 's:test_create_static_large_object:_&:' \
83 + -e 's:test_object_segment_retries:_&:' \
84 + -e 's:test_object_segment_retry_failure:_&:' \
85 + -e 's:test_slo_manifest_retry:_&:' \
86 + -i openstack/tests/unit/cloud/test_object.py || die
87 +
88 + # unhappy about paths due to test runner
89 + sed -e 's:test_method_not_supported:_&:' \
90 + -i openstack/tests/unit/test_exceptions.py || die
91 + sed -e 's:test_repr:_&:' \
92 + -i openstack/tests/unit/test_resource.py || die
93 +
94 + # functional tests require cloud instance access
95 + eunittest -b openstack/tests/unit
96 +}