Skip to content

[IMP] queue_job: Set doctest.REPORT_ONLY_FIRST_FAILURE option.#946

Open
amh-mw wants to merge 1 commit into
OCA:18.0from
amh-mw:18.0-docttest-optionflags
Open

[IMP] queue_job: Set doctest.REPORT_ONLY_FIRST_FAILURE option.#946
amh-mw wants to merge 1 commit into
OCA:18.0from
amh-mw:18.0-docttest-optionflags

Conversation

@amh-mw

@amh-mw amh-mw commented Jul 14, 2026

Copy link
Copy Markdown
Member

This improves doctest output from useless

Traceback (most recent call last):
  File "/mnt/extra-addons/oca/queue/queue_job/tests/test_runner_channels.py", line 15, in test_doctest
    doctest.testmod(
  File "/usr/lib/python3.12/doctest.py", line 1998, in testmod
    runner.run(test)
  File "/usr/lib/python3.12/doctest.py", line 1886, in run
    r = DocTestRunner.run(self, test, compileflags, out, False)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/doctest.py", line 1525, in run
    return self.__run(test, compileflags, out)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/doctest.py", line 1426, in __run
    self.report_failure(out, test, example, got)
  File "/usr/lib/python3.12/doctest.py", line 1895, in report_failure
    raise DocTestFailure(test, example, got)
doctest.DocTestFailure: <DocTest odoo.addons.queue_job.jobrunner.channels.ChannelManager.simple_configure from /mnt/extra-addons/oca/queue/queue_job/jobrunner/channels.py:906 (12 examples)>

to useful

**********************************************************************
File "/mnt/extra-addons/oca/queue/queue_job/jobrunner/channels.py", line 925, in odoo.addons.queue_job.jobrunner.channels.ChannelManager.simple_configure
Failed example:
    cm.get_channel_by_name('seq').capacity
Expected:
    2
Got:
    1
**********************************************************************
1 items had failures:
   1 of  12 in odoo.addons.queue_job.jobrunner.channels.ChannelManager.simple_configure
***Test Failed*** 1 failures.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @guewen, @sbidoul,
some modules you are maintaining are being modified, check this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants