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 — bpo-34031: fix incorrect usage of self.fail in 2 unittests by stoksc · Pull Request #8091 · python/cpython

Conversation

@stoksc

@stoksc stoksc commented Jul 4, 2018 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

https://bugs.python.org/issue34031

Sorry, something went wrong.

Uh oh!

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

All reactions
@stoksc
bpo-34031: fix incorrect usage of self.fail in 2 unittests
58991bd
@the-knights-who-say-ni

the-knights-who-say-ni commented Jul 4, 2018

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

When your account is ready, please add a comment in this pull request
and a Python core developer will remove the CLA not signed label
to make the bot check again.

Thanks again for your contribution, we look forward to reviewing it!

All reactions

Sorry, something went wrong.

Uh oh!

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

@the-knights-who-say-ni the-knights-who-say-ni added the CLA not signed label Jul 4, 2018
@bedevere-bot bedevere-bot added the awaiting review label Jul 4, 2018
@stoksc

stoksc commented Jul 4, 2018

Copy link
Copy Markdown
Contributor Author

CLA is signed.

All reactions

Sorry, something went wrong.

Uh oh!

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

@taleinat taleinat removed the CLA not signed label Jul 5, 2018
@the-knights-who-say-ni the-knights-who-say-ni added the CLA not signed label Jul 5, 2018
taleinat
taleinat suggested changes Jul 5, 2018
View reviewed changes
Comment thread Lib/test/test_urllib2_localnet.py Outdated
self.assertTrue(urllib.request.urlopen(self.server_url))
except urllib.error.HTTPError:
self.fail("Basic auth failed for the url: %s", self.server_url)
self.fail(f"Basic auth failed for the url: {self.server_url}")

@taleinat taleinat Jul 5, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using %-formatting rather than an f-string would make backporting this much easier, since this is to be backported to 2.7.

Sorry, something went wrong.

Uh oh!

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

serhiy-storchaka and stoksc reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@bedevere-bot bedevere-bot removed the awaiting review label Jul 5, 2018
@bedevere-bot

bedevere-bot commented Jul 5, 2018

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot added the awaiting changes label Jul 5, 2018
@taleinat taleinat added needs backport to 3.6 labels Jul 5, 2018
serhiy-storchaka
serhiy-storchaka reviewed Jul 5, 2018
View reviewed changes
Comment thread Lib/test/test_file.py Outdated
f = self.open(TESTFN, 'rb')
if next(f) != filler:
self.fail, "Broken testfile"
self.fail("Broken testfile")

@serhiy-storchaka serhiy-storchaka Jul 5, 2018

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't be better to use assertEqual()?

Sorry, something went wrong.

Uh oh!

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

All reactions

@stoksc stoksc Jul 5, 2018

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, looks a bit neater.

Sorry, something went wrong.

Uh oh!

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

All reactions
@stoksc
requested changes
67dfc31
@stoksc

stoksc commented Jul 5, 2018

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again.

Thanks for taking the time to review my PR.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot added awaiting change review and removed awaiting changes labels Jul 5, 2018
@bedevere-bot

bedevere-bot commented Jul 5, 2018

Copy link
Copy Markdown

Thanks for making the requested changes!

@taleinat: please review the changes made to this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

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

@taleinat taleinat removed the CLA not signed label Jul 6, 2018
@the-knights-who-say-ni the-knights-who-say-ni added the CLA not signed label Jul 6, 2018
@taleinat taleinat added the skip news label Jul 6, 2018
taleinat
taleinat approved these changes Jul 6, 2018
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting change review labels Jul 6, 2018
@taleinat

taleinat commented Jul 6, 2018

Copy link
Copy Markdown
Contributor

@stoksc, you must sign a contributor agreement for us to merge this. Assuming you're fine with that, let me know when it has been signed and accepted.

All reactions

Sorry, something went wrong.

Uh oh!

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

@stoksc

stoksc commented Jul 6, 2018

Copy link
Copy Markdown
Contributor Author

The CLA is signed and accepted. Thanks.

All reactions

Sorry, something went wrong.

Uh oh!

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

@taleinat taleinat removed the CLA not signed label Jul 10, 2018
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Jul 10, 2018
@taleinat
taleinat merged commit 6b490b5 into python:master Jul 10, 2018
@miss-islington

miss-islington commented Jul 10, 2018

Copy link
Copy Markdown
Contributor

Thanks @stoksc for the PR, and @taleinat for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the awaiting merge label Jul 10, 2018
@bedevere-bot

bedevere-bot commented Jul 10, 2018

Copy link
Copy Markdown

GH-8223 is a backport of this pull request to the 3.7 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the needs backport to 3.7 label Jul 10, 2018
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 10, 2018
@stoksc @miss-islington
bpo-34031: fix incorrect usage of self.fail in two tests (pythonGH-8091)
ade5873
Contributed by Bradley Laney.
(cherry picked from commit 6b490b5)

Co-authored-by: Bradley Laney <[email protected]>
@miss-islington

miss-islington commented Jul 10, 2018

Copy link
Copy Markdown
Contributor

Sorry, @stoksc and @taleinat, I could not cleanly backport this to 2.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 6b490b5db40fc29588e8e6cc23bb89c4fed74ad5 2.7

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington miss-islington assigned taleinat Jul 10, 2018
@bedevere-bot

bedevere-bot commented Jul 10, 2018

Copy link
Copy Markdown

GH-8224 is a backport of this pull request to the 3.6 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the needs backport to 3.6 label Jul 10, 2018
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 10, 2018
@stoksc @miss-islington
bpo-34031: fix incorrect usage of self.fail in two tests (pythonGH-8091)
4090996
Contributed by Bradley Laney.
(cherry picked from commit 6b490b5)

Co-authored-by: Bradley Laney <[email protected]>
taleinat pushed a commit to taleinat/cpython that referenced this pull request Jul 10, 2018
@stoksc @taleinat
[2.7] bpo-34031: fix incorrect usage of self.fail in two tests (pytho…
5ebe03e
…nGH-8091)

Contributed by Bradley Laney..
(cherry picked from commit 6b490b5)

Co-authored-by: Bradley Laney <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 2.7 label Jul 10, 2018
@bedevere-bot

bedevere-bot commented Jul 10, 2018

Copy link
Copy Markdown

GH-8225 is a backport of this pull request to the 2.7 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington added a commit that referenced this pull request Jul 10, 2018
@miss-islington @stoksc
bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091)
125371d
Contributed by Bradley Laney.
(cherry picked from commit 6b490b5)

Co-authored-by: Bradley Laney <[email protected]>
miss-islington added a commit that referenced this pull request Jul 10, 2018
@miss-islington @stoksc
bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091)
cb14eb7
Contributed by Bradley Laney.
(cherry picked from commit 6b490b5)

Co-authored-by: Bradley Laney <[email protected]>
taleinat added a commit that referenced this pull request Jul 10, 2018
@taleinat
[2.7] bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091…
6f036bb
…) (#8225)

Actually just one fix on the 2.7 branch.

Contributed by Bradley Laney.

(cherry picked from commit 6b490b5)
@stoksc
stoksc deleted the bpo34031 branch July 10, 2018 14:37
CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request Jul 14, 2018
@CuriousLearner
Merge branch 'master' into bitwise_docs
11c1706
* master: (2633 commits)
  bpo-34087: Fix buffer overflow in int(s) and similar functions (pythonGH-8274)
  bpo-34108: Fix double carriage return in 2to3 on Windows (python#8271)
  bpo-4260: Document that ctypes.xFUNCTYPE are decorators (pythonGH-7924)
  bpo-33723: Fix test_time.test_thread_time() (pythonGH-8267)
  bpo-33967: Remove use of deprecated assertRaisesRegexp() (pythonGH-8261)
  bpo-34080: Fix a memory leak in the compiler. (pythonGH-8222)
  Enable GUI testing on Travis Linux builds via Xvfb (pythonGH-7887)
  bpo-23927: Make getargs.c skipitem() skipping 'w*'. (pythonGH-8192)
  bpo-33648: Remove PY_WARN_ON_C_LOCALE (pythonGH-7114)
  bpo-34092, test_logging: increase SMTPHandlerTest timeout (pythonGH-8245)
  Simplify __all__ in multiprocessing (pythonGH-6856)
  bpo-34083: Update dict order in Functional HOWTO (pythonGH-8230)
  Doc: Point to Simple statements section instead of PEP (pythonGH-8238)
  bpo-29442: Replace optparse with argparse in setup.py (pythonGH-139)
  bpo-33597: Add What's New for PyGC_Head (pythonGH-8236)
  Dataclasses: Fix example on 30.6.8, add method should receive a list rather than an integer. (pythonGH-8038)
  Fix documentation for input and output tutorial (pythonGH-8231)
  bpo-34009: Expand on platform support changes (pythonGH-8022)
  Factor-out two substantially identical code blocks. (pythonGH-8219)
  bpo-34031: fix incorrect usage of self.fail in two tests (pythonGH-8091)
  ...
CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request Jul 15, 2018
@CuriousLearner
Merge branch 'master' into fix-issue8525
fdc3a3d
* master: (1159 commits)
  bpo-34087: Fix buffer overflow in int(s) and similar functions (pythonGH-8274)
  bpo-34108: Fix double carriage return in 2to3 on Windows (python#8271)
  bpo-4260: Document that ctypes.xFUNCTYPE are decorators (pythonGH-7924)
  bpo-33723: Fix test_time.test_thread_time() (pythonGH-8267)
  bpo-33967: Remove use of deprecated assertRaisesRegexp() (pythonGH-8261)
  bpo-34080: Fix a memory leak in the compiler. (pythonGH-8222)
  Enable GUI testing on Travis Linux builds via Xvfb (pythonGH-7887)
  bpo-23927: Make getargs.c skipitem() skipping 'w*'. (pythonGH-8192)
  bpo-33648: Remove PY_WARN_ON_C_LOCALE (pythonGH-7114)
  bpo-34092, test_logging: increase SMTPHandlerTest timeout (pythonGH-8245)
  Simplify __all__ in multiprocessing (pythonGH-6856)
  bpo-34083: Update dict order in Functional HOWTO (pythonGH-8230)
  Doc: Point to Simple statements section instead of PEP (pythonGH-8238)
  bpo-29442: Replace optparse with argparse in setup.py (pythonGH-139)
  bpo-33597: Add What's New for PyGC_Head (pythonGH-8236)
  Dataclasses: Fix example on 30.6.8, add method should receive a list rather than an integer. (pythonGH-8038)
  Fix documentation for input and output tutorial (pythonGH-8231)
  bpo-34009: Expand on platform support changes (pythonGH-8022)
  Factor-out two substantially identical code blocks. (pythonGH-8219)
  bpo-34031: fix incorrect usage of self.fail in two tests (pythonGH-8091)
  ...
CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request Jul 21, 2018
@CuriousLearner
Merge branch 'master' of github.com:CuriousLearner/cpython into fix-i…
7b039a0
…ssue-33014

* 'master' of github.com:CuriousLearner/cpython: (722 commits)
  bpo-34087: Fix buffer overflow in int(s) and similar functions (pythonGH-8274)
  bpo-34108: Fix double carriage return in 2to3 on Windows (python#8271)
  bpo-4260: Document that ctypes.xFUNCTYPE are decorators (pythonGH-7924)
  bpo-33723: Fix test_time.test_thread_time() (pythonGH-8267)
  bpo-33967: Remove use of deprecated assertRaisesRegexp() (pythonGH-8261)
  bpo-34080: Fix a memory leak in the compiler. (pythonGH-8222)
  Enable GUI testing on Travis Linux builds via Xvfb (pythonGH-7887)
  bpo-23927: Make getargs.c skipitem() skipping 'w*'. (pythonGH-8192)
  bpo-33648: Remove PY_WARN_ON_C_LOCALE (pythonGH-7114)
  bpo-34092, test_logging: increase SMTPHandlerTest timeout (pythonGH-8245)
  Simplify __all__ in multiprocessing (pythonGH-6856)
  bpo-34083: Update dict order in Functional HOWTO (pythonGH-8230)
  Doc: Point to Simple statements section instead of PEP (pythonGH-8238)
  bpo-29442: Replace optparse with argparse in setup.py (pythonGH-139)
  bpo-33597: Add What's New for PyGC_Head (pythonGH-8236)
  Dataclasses: Fix example on 30.6.8, add method should receive a list rather than an integer. (pythonGH-8038)
  Fix documentation for input and output tutorial (pythonGH-8231)
  bpo-34009: Expand on platform support changes (pythonGH-8022)
  Factor-out two substantially identical code blocks. (pythonGH-8219)
  bpo-34031: fix incorrect usage of self.fail in two tests (pythonGH-8091)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka left review comments
+1 more reviewer
@taleinat taleinat taleinat approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

@taleinat taleinat

Labels

skip news

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.

6 participants

@stoksc @the-knights-who-say-ni @bedevere-bot @taleinat @miss-islington @serhiy-storchaka
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.