python / python/cpython

`inspect.getmembers` is not fully tested

Open
#116,789 0 comments 0 reactions 1 assignee View on GitHub

@sobolevn is already working on this.

Since Mar 14, 2024.

tests type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Bug report

Right now test_inspect checks getmembers with mostly classes and methods.
It does not test: function, traceback, code, frame, generator, coroutine, and builtin objects.
We should also test how predicate works for these objects.

However, they are listed in the docs: https://github.com/python/cpython/blob/a18c9854e8c255981f07c0a1c1503253f85b7540/Doc/library/inspect.rst#L47-L248

I will send a PR with new tests.

Linked PRs
  • gh-116802
  • gh-123129
  • gh-123130
  • gh-127052

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.