Skip to content

test_monitoring contains hardcoded line numbers #115836

Closed

Description

@swtaarrs

Bug report

Bug description:

test_lines_single, test_lines_loop, and test_lines_two in test_monitoring.LinesMonitoringTest all contain some hardcoded line numbers in their expected values. They should consistently use offsets from co_firstlineno on the relevant code objects instead.

I ran into this while adding a test for gh-115832, and already have a fix ready to put up as a PR.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added a commit that references this issue on Feb 23, 2024
  2. added a commit that references this issue on Feb 23, 2024
  3. itamaro commented on Feb 23, 2024

    @itamaro
    Contributor

    Fix merged, closing the issue (please reopen if there's more left to do here).

  4. added a commit that references this issue on Mar 4, 2024
  5. added a commit that references this issue on Apr 17, 2024
  6. added a commit that references this issue on Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions