Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue38669

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:patch.object should raise another error when first argument is a str
Type:enhancementStage:resolved
Components:TestsVersions:Python 3.9
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: Elena.Oat, cjw296, lisroach, mariocj89, michael.foord, terry.reedy, xtreak
Priority:normalKeywords:patch

Created on2019-11-03 02:30 byElena.Oat, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 17034mergedElena.Oat,2019-11-03 19:42
PR 17510mergedmiss-islington,2019-12-08 20:15
PR 17511mergedmiss-islington,2019-12-08 20:18
Messages (5)
msg355886 -(view)Author: Elena Oat (Elena.Oat)*Date: 2019-11-03 02:30
When using patch.object with first argument as a string, e.g. ´´patch.object('SomeClass', 'somemethod')´´ this raises ´´AttributeError: Something does not have the attribute 'do_something'´´. This should instead warn user that the correct type for the first argument is a class.
msg356258 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2019-11-08 19:57
This enhancement request (no backports) is about the unittest.mock patch.object.https://docs.python.org/3/library/unittest.mock.html#unittest.mock.patch.object
msg358023 -(view)Author: Chris Withers (cjw296)*(Python committer)Date: 2019-12-08 20:14
New changesetcd90a52983db34896a6335a572d55bdda274778f by Chris Withers (Elena Oat) in branch 'master':bpo-38669: patch.object now raises a helpful error (GH17034)https://github.com/python/cpython/commit/cd90a52983db34896a6335a572d55bdda274778f
msg358057 -(view)Author: Chris Withers (cjw296)*(Python committer)Date: 2019-12-09 06:59
New changeset4594565b56e9c99d2d3fb7549041bbca5ecba8e2 by Chris Withers (Miss Islington (bot)) in branch '3.8':bpo-38669: patch.object now raises a helpful error (GH17510)https://github.com/python/cpython/commit/4594565b56e9c99d2d3fb7549041bbca5ecba8e2
msg358058 -(view)Author: Chris Withers (cjw296)*(Python committer)Date: 2019-12-09 06:59
New changeset41973c99fdfdc78315e819661e279bdcc2f058b1 by Chris Withers (Miss Islington (bot)) in branch '3.7':bpo-38669: patch.object now raises a helpful error (GH17511)https://github.com/python/cpython/commit/41973c99fdfdc78315e819661e279bdcc2f058b1
History
DateUserActionArgs
2022-04-11 14:59:22adminsetgithub: 82850
2019-12-09 07:00:24cjw296setstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-12-09 06:59:26cjw296setmessages: +msg358058
2019-12-09 06:59:16cjw296setmessages: +msg358057
2019-12-08 20:18:10miss-islingtonsetpull_requests: +pull_request16987
2019-12-08 20:15:08miss-islingtonsetpull_requests: +pull_request16986
2019-12-08 20:14:44cjw296setmessages: +msg358023
2019-11-08 19:57:53terry.reedysetversions: - Python 3.5, Python 3.6, Python 3.7, Python 3.8
nosy: +terry.reedy

messages: +msg356258

type: enhancement
2019-11-03 19:42:26Elena.Oatsetkeywords: +patch
stage: patch review
pull_requests: +pull_request16549
2019-11-03 02:58:59xtreaksetnosy: +cjw296,michael.foord,lisroach,mariocj89,xtreak
2019-11-03 02:30:39Elena.Oatcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp