GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix asyncio locks test case · Issue #93247 · python/cpython

Fix asyncio locks test case #93247

New issue
Copy link
New issue
Copy link
Closed
Closed
Fix asyncio locks test case#93247
Copy link
Labels
topic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@cykerway
cykerway
opened on May 26, 2022
Issue body actions

There are some clear minor mistakes in asyncio locks test case: Duplicate statements and wrong assert function.

The duplicate statements (L846 and L850) might be intentional but the assert function (L856) is obviously wrong.

cpython/Lib/test/test_asyncio/test_locks.py

Lines 845 to 856 in 5185956

await asyncio.sleep(0)
self.assertEqual(0, sem._value)
self.assertEqual(3, len(result))
self.assertTrue(sem.locked())
self.assertEqual(1, len(sem._waiters))
self.assertEqual(0, sem._value)
self.assertTrue(t1.done())
self.assertTrue(t1.result())
race_tasks = [t2, t3, t4]
done_tasks = [t for t in race_tasks if t.done() and t.result()]
self.assertTrue(2, len(done_tasks))

Activity

  1. ronaldoussoren
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    topic-asyncio
    on May 26, 2022
  2. JelleZijlstra
    added a commit that references this issue on Jun 6, 2022

    gh-93247: Fix assert function in asyncio locks test (#93248)

    9081bbd
  3. miss-islington
    added 4 commits that reference this issue on Jun 6, 2022

    pythongh-93247: Fix assert function in asyncio locks test (pythonGH-9…

    ad0c377

    pythongh-93247: Fix assert function in asyncio locks test (pythonGH-9…

    43be7d5

    gh-93247: Fix assert function in asyncio locks test (GH-93248)

    fd247db

    gh-93247: Fix assert function in asyncio locks test (GH-93248)

    a848a98
  4. kumaraditya303 commented on Jun 14, 2022

    @kumaraditya303
    kumaraditya303
    on Jun 14, 2022
    Contributor
    More actions

    Fixed by #93248

  5. kumaraditya303
    closed this as completedon Jun 14, 2022
  6. serhiy-storchaka
    added a commit that references this issue on Jun 26, 2022

    Revert 30935 defer bpo45162 to 312 (#94285)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.