Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #15431
| Path | csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod |
|---|---|
| From | julien.puydt@gmail.com |
| Newsgroups | linux.debian.maint.python, linux.debian.bugs.dist |
| Subject | Broken entrypoints package: actually a pybuild issue? |
| Date | Tue, 23 Jan 2024 14:20:02 +0100 |
| Message-ID | <HZoR4-52SN-11@gated-at.bofh.it> (permalink) |
| X-Mailbox-Line | From debian-python-request@lists.debian.org Tue Jan 23 13:17:40 2024 |
| Old-Return-Path | <julien.puydt@gmail.com> |
| X-Amavis-Spam-Status | No, score=-6.572 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, LDO_WHITELIST=-5, RCVD_IN_DNSWL_NONE=-0.0001, SARE_MSGID_LONG40=0.637, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no |
| X-Policyd-Weight | NOT_IN_SBL_XBL_SPAMHAUS=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-wm1-x332.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -5.5 |
| X-Gm-Message-State | AOJu0YxOqSxPdgUhDyhJXII+aY+48lGTDsvAC2Zb1Kq8nW9Yt5GJ+5Tx oSLzlr5Z3wB69vdEJ7vXiskp2wYPgygxrnwjAOifc0bCl17kstBTGQa0wt8s |
| X-Google-SMTP-Source | AGHT+IFmwpq1fq8wTRZvla4Z+qcgXEXVDomtXdyhSeHydpEpKXRWe/rJUYSU7Hyqdrz7WUizXEmBCw== |
| X-Received | by 2002:a05:600c:4487:b0:40e:b17f:172e with SMTP id e7-20020a05600c448700b0040eb17f172emr136466wmo.52.1706015834649; Tue, 23 Jan 2024 05:17:14 -0800 (PST) |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | quoted-printable |
| User-Agent | Evolution 3.50.3-1 |
| MIME-Version | 1.0 |
| X-Mailing-List | <debian-python@lists.debian.org> archive/latest/21392 |
| List-ID | <debian-python.lists.debian.org> |
| List-URL | <https://lists.debian.org/debian-python/> |
| List-Archive | https://lists.debian.org/msgid-search/f560a0722cab6316a6a45f854e61431dd746420d.camel@gmail.com |
| Approved | robomod@news.nic.it |
| Lines | 79 |
| Organization | linux.* mail to news gateway |
| Sender | robomod@news.nic.it |
| X-Original-Date | Tue, 23 Jan 2024 14:17:13 +0100 |
| X-Original-Message-ID | <f560a0722cab6316a6a45f854e61431dd746420d.camel@gmail.com> |
| Xref | csiph.com linux.debian.maint.python:15431 linux.debian.bugs.dist:1183226 |
Cross-posted to 2 groups.
Show key headers only | View raw
Hi,
I found the source of the breakage for the entrypoints package: its
tests/samples/ directory contains a few files describing mock Python
packages, and the tests consist in running functions on those and check
the answers match what is expected.
Alas, something (and I suspect pybuild) removes the *.egg-info
directories there, so of course results don't match.
I see two ways out:
(1) configure something so tests/samples/ doesn't get touched ;
(2) patch the tests to adapt them to the modified directories.
Solution (2) is pretty fast, pretty easy and extremely dirty: it will
need an update for each upstream change and that basically means the
tests don't actually test anything.
Solution (1) is much more reliable, but I neither know if it's possible
nor how - can someone lend a hand?
Thanks!
J.Puydt
PS: the patch would be that ugly:
Description: fix bug #1052826 (broken tests)
Author: Julien Puydt
Forwarded: not needed
--- entrypoints.orig/tests/test_entrypoints.py
+++ entrypoints/tests/test_entrypoints.py
@@ -19,31 +19,31 @@
def test_iter_files_distros():
result = entrypoints.iter_files_distros(path=sample_path)
- # the sample_path has 4 unique items so iter_files_distros returns
4 tuples
- assert len(list(result)) == 4
+ # the sample_path has 3 unique items so iter_files_distros returns
3 tuples
+ assert len(list(result)) == 3
# testing a development, egg aka installed with pip install -e .
# these don't have version info in the .egg-info directory name
# (eg dev-0.0.1.egg-info)
path_with_dev = [osp.join(samples_dir, 'packages4')]
result = entrypoints.iter_files_distros(path=path_with_dev)
- assert len(list(result)) == 1
+ assert len(list(result)) == 0
# duplicate dev versions should still return one result
path_with_dev_duplicates = path_with_dev * 2
result =
entrypoints.iter_files_distros(path=path_with_dev_duplicates)
- assert len(list(result)) == 1
+ assert len(list(result)) == 0
def test_get_group_all():
group = entrypoints.get_group_all('entrypoints.test1',
sample_path)
print(group)
- assert len(group) == 5
- assert {ep.name for ep in group} == {'abc', 'rew', 'opo', 'njn'}
+ assert len(group) == 3
+ assert {ep.name for ep in group} == {'abc', 'rew', 'njn'}
def test_get_group_named():
group = entrypoints.get_group_named('entrypoints.test1',
sample_path)
print(group)
- assert len(group) == 4
+ assert len(group) == 3
assert group['abc'].module_name == 'foo'
assert group['abc'].object_name == 'abc'
Back to linux.debian.maint.python | Previous | Next | Find similar | Unroll thread
Broken entrypoints package: actually a pybuild issue? julien.puydt@gmail.com - 2024-01-23 14:20 +0100
csiph-web