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 — gh-92886: Fix test in `test_routines.py` so that it works when running with optimizations (`-O`) by jackh-ncl · Pull Request #93232 · python/cpython

Conversation

@jackh-ncl

@jackh-ncl jackh-ncl commented May 25, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

#92886

Before:

$ ./python.exe -Om unittest test.test_coroutines

........................./Users/.../dev/cpython/Lib/test/test_coroutines.py:2207: RuntimeWarning: coroutine 'CoroutineTest.test_bpo_45813_2.<locals>.f' was never awaited
  with self.assertWarns(RuntimeWarning):
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
............................................................F.........
======================================================================
FAIL: test_with_5 (test.test_coroutines.CoroutineTest.test_with_5)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/.../dev/cpython/Lib/test/test_coroutines.py", line 1284, in test_with_5
    with self.assertRaises(AssertionError):
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: AssertionError not raised

----------------------------------------------------------------------
Ran 95 tests in 0.323s

FAILED (failures=1)

After:

$ ./python.exe -Om unittest test.test_coroutines

........................./Users/jackhindmarch/dev/cpython/Lib/test/test_coroutines.py:2207: RuntimeWarning: coroutine 'CoroutineTest.test_bpo_45813_2.<locals>.f' was never awaited
  with self.assertWarns(RuntimeWarning):
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
......................................................................
----------------------------------------------------------------------
Ran 95 tests in 0.325s

OK

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Jack Hindmarch
Fixing test in test_routines.py so that it works when running with …
febb50c
…optimizations (`-O`)
@bedevere-bot

bedevere-bot commented May 25, 2022

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added tests Tests in the Lib/test dir awaiting review labels May 25, 2022
@blurb-it
📜🤖 Added by blurb_it.
130557a
@jackh-ncl
jackh-ncl marked this pull request as ready for review May 25, 2022 22:23
@kumaraditya303

kumaraditya303 commented Oct 18, 2022

Copy link
Copy Markdown
Contributor

News entry is not required, you can remove it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kumaraditya303 kumaraditya303 added the skip news label Oct 18, 2022
@jackh-ncl
Delete 2022-05-25-22-23-38.gh-issue-92886.axhrWH.rst
5bffd7d
@jackh-ncl

jackh-ncl commented Oct 18, 2022

Copy link
Copy Markdown
Contributor Author

News entry is not required, you can remove it.

done

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kumaraditya303
kumaraditya303 requested a review from JelleZijlstra October 18, 2022 15:12
kumaraditya303
kumaraditya303 approved these changes Oct 18, 2022
View reviewed changes
@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels Oct 18, 2022
@JelleZijlstra
Merge branch 'main' into 92886-coroutines
2f4351e
@JelleZijlstra

JelleZijlstra commented Oct 18, 2022

Copy link
Copy Markdown
Member

@iritkatriel made this same change already in #98060.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JelleZijlstra JelleZijlstra closed this Oct 18, 2022
@iritkatriel

iritkatriel commented Oct 18, 2022

Copy link
Copy Markdown
Member

Sorry, I didn't see this.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@kumaraditya303 kumaraditya303 kumaraditya303 approved these changes
@JelleZijlstra JelleZijlstra Awaiting requested review from JelleZijlstra

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting core review skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@jackh-ncl @bedevere-bot @kumaraditya303 @JelleZijlstra @iritkatriel
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.