1 |
commit: 6da7547c74c70d5edb361414269976709f162d3e |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 2 11:28:43 2021 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 2 11:39:33 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6da7547c |
7 |
|
8 |
dev-python/mongoengine: enable py3.10, cleanup testing |
9 |
|
10 |
- use EPYTEST_DESELECT for disabling tests |
11 |
- in case loading mongod fails, instead of redirecting to log file, |
12 |
output it, to make it easier sending build.log with all info |
13 |
|
14 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
15 |
|
16 |
dev-python/mongoengine/mongoengine-0.23.1.ebuild | 48 ++++++++++++------------ |
17 |
1 file changed, 23 insertions(+), 25 deletions(-) |
18 |
|
19 |
diff --git a/dev-python/mongoengine/mongoengine-0.23.1.ebuild b/dev-python/mongoengine/mongoengine-0.23.1.ebuild |
20 |
index 8bc583611f9..299f1c98034 100644 |
21 |
--- a/dev-python/mongoengine/mongoengine-0.23.1.ebuild |
22 |
+++ b/dev-python/mongoengine/mongoengine-0.23.1.ebuild |
23 |
@@ -3,7 +3,7 @@ |
24 |
|
25 |
EAPI=7 |
26 |
|
27 |
-PYTHON_COMPAT=( python3_{7..9} ) |
28 |
+PYTHON_COMPAT=( python3_{8..10} ) |
29 |
inherit distutils-r1 |
30 |
|
31 |
DESCRIPTION="A Python Object-Document-Mapper for working with MongoDB" |
32 |
@@ -25,48 +25,46 @@ BDEPEND=" |
33 |
|
34 |
distutils_enable_tests pytest |
35 |
|
36 |
-src_prepare() { |
37 |
- # TODO: investigate |
38 |
- sed -e 's:test_covered_index:_&:' \ |
39 |
- -i tests/document/test_indexes.py || die |
40 |
- # no $eval |
41 |
- sed -e 's:test_exec_js_field_sub:_&:' \ |
42 |
- -e 's:test_exec_js_query:_&:' \ |
43 |
- -e 's:test_item_frequencies_normalize:_&:' \ |
44 |
- -e 's:test_item_frequencies_with_0_values:_&:' \ |
45 |
- -e 's:test_item_frequencies_with_False_values:_&:' \ |
46 |
- -e 's:test_item_frequencies_with_null_embedded:_&:' \ |
47 |
- -i tests/queryset/test_queryset.py || die |
48 |
- # TODO: investigate (wrong order? bad comparison?) |
49 |
- sed -e 's:test_distinct_ListField_EmbeddedDocumentField:_&:' \ |
50 |
- -i tests/queryset/test_queryset.py || die |
51 |
- |
52 |
- distutils-r1_src_prepare |
53 |
-} |
54 |
- |
55 |
python_test() { |
56 |
+ local EPYTEST_DESELECT=( |
57 |
+ # TODO: investigate |
58 |
+ tests/document/test_indexes.py::TestIndexes::test_collation |
59 |
+ tests/document/test_indexes.py::TestIndexes::test_covered_index |
60 |
+ tests/document/test_indexes.py::TestIndexes::test_create_geohaystack_index |
61 |
+ # no $eval |
62 |
+ tests/queryset/test_queryset.py::TestQueryset::test_exec_js_query |
63 |
+ tests/queryset/test_queryset.py::TestQueryset::test_exec_js_field_sub |
64 |
+ tests/queryset/test_queryset.py::TestQueryset::test_item_frequencies_normalize |
65 |
+ tests/queryset/test_queryset.py::TestQueryset::test_item_frequencies_with_0_values |
66 |
+ tests/queryset/test_queryset.py::TestQueryset::test_item_frequencies_with_False_values |
67 |
+ tests/queryset/test_queryset.py::TestQueryset::test_item_frequencies_with_null_embedded |
68 |
+ # TODO: investigate (wrong order? bad comparison?) |
69 |
+ tests/queryset/test_queryset.py::TestQueryset::test_distinct_ListField_EmbeddedDocumentField |
70 |
+ ) |
71 |
+ |
72 |
local dbpath=${TMPDIR}/mongo.db |
73 |
local logpath=${TMPDIR}/mongod.log |
74 |
+ local DB_PORT=27017 |
75 |
|
76 |
mkdir -p "${dbpath}" || die |
77 |
ebegin "Trying to start mongod on port ${DB_PORT}" |
78 |
|
79 |
LC_ALL=C \ |
80 |
mongod --dbpath "${dbpath}" --nojournal \ |
81 |
- --bind_ip 127.0.0.1 --port 27017 \ |
82 |
+ --bind_ip 127.0.0.1 --port ${DB_PORT} \ |
83 |
--unixSocketPrefix "${TMPDIR}" \ |
84 |
--logpath "${logpath}" --fork || die |
85 |
sleep 2 |
86 |
|
87 |
# Now we need to check if the server actually started... |
88 |
- if [[ -S "${TMPDIR}"/mongodb-27017.sock ]]; then |
89 |
+ if [[ -S "${TMPDIR}"/mongodb-${DB_PORT}.sock ]]; then |
90 |
# yay! |
91 |
eend 0 |
92 |
else |
93 |
eend 1 |
94 |
- eerror "Unable to start mongod for tests. See the server log:" |
95 |
- eerror " ${logpath}" |
96 |
- die "Unable to start mongod for tests." |
97 |
+ eerror "Unable to start mongod for tests. Here is the server log:" |
98 |
+ cat "${logpath}" |
99 |
+ die "Unable to start mongod for tests" |
100 |
fi |
101 |
|
102 |
local failed |