Skip to content

[tests] Test case 'test_domain_cpp_build_semicolon' fails when run individually. #12121

Open

Description

@jayaddison

Describe the bug

Unit tests should not rely upon being run in any particular order; ideally they should test behaviours of the underlying code whether they run in the same order that they're declared in the test module, or any other arbitrary ordering.

By extension this means that it should be possible to run an individual unit test.

Currently at commit bf0bec3 the test_domain_cpp_build_semicolon unit test fails when it is run individually.

How to Reproduce

This can be replicated by checking out the code at bf0bec3, installing the Python test dependencies, and running:

$ pytest tests/test_domains/test_domain_cpp.py -k semicolon
...
=========================== short test summary info ============================
FAILED tests/test_domains/test_domain_cpp.py::test_domain_cpp_build_semicolon - AssertionError: assert 1 == 0
====================== 1 failed, 115 deselected in 0.72s =======================

Environment Information

Platform:              linux; (Linux-6.6.15-rt-amd64-x86_64-with-glibc2.37)
Python version:        3.11.8 (main, Feb  7 2024, 21:52:08) [GCC 13.2.0])
Python implementation: CPython
Sphinx version:        7.3.0+/bf0bec3b4
Docutils version:      0.20.1
Jinja2 version:        3.1.3
Pygments version:      2.17.2

Sphinx extensions

N/A

Additional context

Fixing this would contribute towards resolving #11285.

Activity

  1. picnixz commented on Mar 23, 2024

    @picnixz
    Member

    Ah yes, I know about this one. I've fixed it locally so let me find the patch today.

  2. apteryks commented on Nov 20, 2025

    @apteryks

    @picnixz did yo find which commit resolved it? :-)

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions