[
https://issues.apache.org/jira/browse/QPID-8170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17711533#comment-17711533
]
ASF GitHub Bot commented on QPID-8170:
--------------------------------------
jiridanek opened a new pull request, #18:
URL: https://github.com/apache/qpid-python/pull/18
The problem stems from the way the testcode imports the production code, so
that when both have a module of the same name, the test runner descends into
the production code when discovering tests, instead of into the test code.
```
{code:title=qpid/tests/messaging/__init__.py}
from qpid.tests.messaging.implementation import *
[...]
from . import address, endpoints, message, selector
{code}
The file imported on the first line contains
{code:title=qpid/tests/messaging/implementation.py}
from qpid.messaging import *
{code}
```
and {{qpid.messaging}} contains its own {{address.py}} submodule.
Therefore, when {{qpid-test-runner}} tries to access
{{qpid.tests.messaging.mesage}}, it actually gets {{qpid.messaging.message}},
which was imported first. But that does not contain any tests, and the message
tests are missed and never executed.
This only started happening after my relative imports modernizing commit
https://github.com/apache/qpid-python/commit/9651001c6fe0b65e538a96e27df36582b7ccb004.
Before, Totals: 349 tests, 349 passed, 0 skipped, 0 ignored, 0 failed and
Totals: 678 tests, 585 passed, 93 skipped, 0 ignored, 0 failed
(https://github.com/apache/qpid-python/actions/runs/4661323947/jobs/8250463871)
After, Totals: 218 tests, 218 passed, 0 skipped, 0 ignored, 0 failed and
Totals: 547 tests, 454 passed, 93 skipped, 0 ignored, 0 failed
(https://github.com/apache/qpid-python/actions/runs/4661535006/jobs/8250915935)
> Add a CI job
> ------------
>
> Key: QPID-8170
> URL: https://issues.apache.org/jira/browse/QPID-8170
> Project: Qpid
> Issue Type: Task
> Components: Python Client
> Affects Versions: qpid-python-1.38.0
> Reporter: Justin Ross
> Assignee: Justin Ross
> Priority: Major
> Fix For: qpid-python-1.38.0
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]