Skip to content

Conversation

@chbndrhnns
Copy link
Contributor

@chbndrhnns chbndrhnns commented Feb 27, 2025

Fixes https://youtrack.jetbrains.com/issue/PY-71963/Jump-to-source-from-test-panel-fails-when-using-nested-classes


Note

Enables resolving nested classes and their methods during qualified name lookup and adds tests covering inner/nested class scenarios in PyTestsLocator.

  • Resolution logic (QualifiedNameExt.kt):
    • Enhance QualifiedName.getElementAndResolvableName to resolve nested PyClass hierarchies and locate methods within nested classes (including multi-level nesting), with fallback to current class method lookup.
  • Tests:
    • Add PyTestsLocatorTest covering:
      • Method in top-level class (test_.Test.test_1).
      • Resolving inner class (test.TestOuter.TestInner).
      • Method in inner class and in multi-level nested classes (...TestInner.test_1).

Written by Cursor Bugbot for commit f0ca832. This will update automatically on new commits. Configure here.

@BartvHelvert BartvHelvert requested a review from EliseevEgor March 3, 2025 13:38
@BartvHelvert BartvHelvert added the PyCharm Pull requests for PyCharm label Mar 21, 2025
@chbndrhnns
Copy link
Contributor Author

Rebased onto 251.
@EliseevEgor Do you need anything else from me?

@chbndrhnns
Copy link
Contributor Author

@EliseevEgor @BartvHelvert This has been untouched for three months now. May I ask for an update?

@missingdays
Copy link
Contributor

@chbndrhnns thanks a lot for your contribution!

Some of your changes are not covered by the new tests. Could you please add new tests to cover them?

@chbndrhnns chbndrhnns changed the base branch from 251 to master November 11, 2025 09:21
@chbndrhnns
Copy link
Contributor Author

I updated the PR.

intellij-monorepo-bot pushed a commit that referenced this pull request Nov 11, 2025
Originally implemented by chbndrhnns in #2972

Co-authored-by: chbndrhnns <[email protected]>

GitOrigin-RevId: 9c77edd1e868ad0120f2f3f0d618940388619f00
@missingdays
Copy link
Contributor

@chbndrhnns Thank you!
I merged the PR using our internal infrastructure and closed the related ticket.
Thanks again for your contribution.

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

Labels

PyCharm Pull requests for PyCharm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants