You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "jiridanek (via GitHub)" <gi...@apache.org> on 2023/04/12 19:38:31 UTC

[GitHub] [qpid-python] jiridanek opened a new pull request, #18: QPID-8170: fix qpid-python-test discovery broken by commit 85348b01

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)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[GitHub] [qpid-python] jiridanek commented on pull request #18: QPID-8170: fix qpid-python-test discovery broken by commit 85348b01

Posted by "jiridanek (via GitHub)" <gi...@apache.org>.
jiridanek commented on PR #18:
URL: https://github.com/apache/qpid-python/pull/18#issuecomment-1505826296

   ```
   >>> 678-349
   329
   ```
   
   So the total test count is correct, albeit the second command runs less tests because it now does not run again what was run in the first command.
   
   ```
   $ python2 qpid-python-test -l | wc
       349     349   19741
   ```
   
   ```
   $ python2 qpid-python-test -l -m qpid_tests | wc
       329     329   22640
   ```
   
   ```
   $ python2 qpid-python-test -l -m qpid_tests -m qpid.tests | wc
       678     678   42381
   ```
   
   All tests accounted for.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[GitHub] [qpid-python] jiridanek merged pull request #18: QPID-8170: fix qpid-python-test discovery broken by commit 85348b01

Posted by "jiridanek (via GitHub)" <gi...@apache.org>.
jiridanek merged PR #18:
URL: https://github.com/apache/qpid-python/pull/18


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org