This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add tests for importlib.machinery.WindowsRegistryFinder
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: Arfrever, BreamoreBoy, Claudiu.Popa, Jim.Jewett, brett.cannon, eric.snow, loewis, ncoghlan, python-dev, vajrasky
Priority: normal Keywords: patch

Created on 2013-11-22 17:02 by brett.cannon, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue19714.patch Claudiu.Popa, 2014-03-21 14:32 review
issue19714.patch Claudiu.Popa, 2014-03-21 16:38 Add comment explaining the module name. review
issue19714.patch Claudiu.Popa, 2014-03-22 19:31 Renamed delete_tree to delete_registry_key for clarity reasons. review
issue19714_2.patch Claudiu.Popa, 2014-06-15 20:20 review
Messages (11)
msg203809 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-11-22 17:02
At least mocking out things if manipulating the Windows registry during testing is considered bad or difficult to make sure that stuff basically works.
msg207209 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2014-01-03 05:42
I added 2 rudimentary tests for issue #20097 which gives at least coverage in the test suite, but we need the following tests still:

* registry entry exists and module is found (spec returned)
* registry entry exists and module is not found (None returned)

Depending on what time I have I may take a stab at this using test_winreg as an example.
msg214370 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2014-03-21 14:32
Hello. Here's a patch for this issue. It tests only the conditions described by Eric.
msg215073 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2014-03-28 19:44
Martin: are you okay with Claudiu's latest patch?
msg217110 - (view) Author: Jim Jewett (Jim.Jewett) * (Python triager) Date: 2014-04-24 01:59
Pinging Martin ... earlier comments seem to have been completed.
msg220671 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2014-06-15 20:20
Attached a new version of the patch. The previous one called find_spec twice in the same test.
msg222287 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-04 14:39
Latest patch LGTM at a quick glance.  Can we have a patch review please as #18864 is dependent on this.
msg222360 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2014-07-05 13:32
I can do the review if no Windows people step forward.
msg222438 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-07-07 07:08
The patch looks fine to me. Someone please apply.
msg225665 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-08-22 14:28
New changeset a21ddb1c41d2 by Brett Cannon in branch 'default':
Issue #19714: Tests for importlib.machinery.WindowsRegistryFinder.
http://hg.python.org/cpython/rev/a21ddb1c41d2
msg225666 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2014-08-22 14:29
Thanks for the patch, Claudiu. Sorry it took so long to apply, but you know what I have been working on instead so I'm sure you understand. =)
History
Date User Action Args
2022-04-11 14:57:54adminsetgithub: 63913
2014-08-22 14:43:20berker.peksagsetstage: commit review -> resolved
2014-08-22 14:29:28brett.cannonsetstatus: open -> closed
resolution: fixed
messages: + msg225666
2014-08-22 14:28:53python-devsetnosy: + python-dev
messages: + msg225665
2014-08-13 14:42:53brett.cannonsetassignee: brett.cannon
2014-07-07 07:08:44loewissetmessages: + msg222438
stage: patch review -> commit review
2014-07-05 13:32:30brett.cannonsetmessages: + msg222360
2014-07-04 14:39:14BreamoreBoysetnosy: + BreamoreBoy
messages: + msg222287
2014-06-15 20:20:24Claudiu.Popasetfiles: + issue19714_2.patch

messages: + msg220671
2014-06-15 20:11:29Claudiu.Popasetstage: test needed -> patch review
versions: + Python 3.5
2014-04-24 01:59:50Jim.Jewettsetnosy: + Jim.Jewett
messages: + msg217110
2014-03-28 19:44:17eric.snowsetmessages: + msg215073
2014-03-22 19:31:43Claudiu.Popasetfiles: + issue19714.patch
2014-03-21 16:38:11Claudiu.Popasetfiles: + issue19714.patch
2014-03-21 14:32:55Claudiu.Popasetfiles: + issue19714.patch

nosy: + Claudiu.Popa
messages: + msg214370

keywords: + patch
2014-01-03 05:42:39eric.snowsetmessages: + msg207209
2014-01-03 05:39:24eric.snowunlinkissue20097 dependencies
2014-01-01 01:45:31pitrousetnosy: + vajrasky
2013-12-30 22:05:31brett.cannonlinkissue20097 dependencies
2013-12-11 17:21:21eric.snowsetnosy: + loewis
2013-11-23 19:54:22Arfreversetnosy: + Arfrever
2013-11-22 17:03:01brett.cannonlinkissue18864 dependencies
2013-11-22 17:02:19brett.cannonsetnosy: + ncoghlan, eric.snow
2013-11-22 17:02:11brett.cannoncreate