Skip to content

test_asyncio has several expired hasattr checks #109505

Closed

Description

@sobolevn

Bug report

The first one:

@unittest.skipUnless(hasattr(collections.abc, 'Coroutine'),
'No collections.abc.Coroutine')
def test_coroutine_like_object_debug_formatting(self):

From: 8dc3e43

I cannot think of any reasonable python version / alternative interpreter that does not have collections.abc.Coroutine. Since this commit was added >7 years ago, I think it can be removed for good.

Another one is:

if hasattr(support, 'TEST_HOME_DIR'):

From: f111b3d#diff-73a82d560b5e6a3b3abd58b460de2b09eaf53e3d1598a263a7b3a61d41068d34

Which is also from 6 years ago, now support always has this member.

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    testsTests in the Lib/test dir
    on Sep 17, 2023
  2. self-assigned this
    on Sep 17, 2023
  3. added a commit that references this issue on Sep 17, 2023
  4. added a commit that references this issue on Sep 23, 2023
  5. added a commit that references this issue on Sep 28, 2023
  6. added a commit that references this issue on Sep 2, 2024
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