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.

Author steve.dower
Recipients ZackerySpytz, eryksun, nanonyme, paul.moore, steve.dower, tim.golden, zach.ware
Date 2019-05-13.15:54:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557762844.59.0.647338289606.issue32587@roundup.psfhosted.org>
In-reply-to
Content
Updating the title to actually reflect the issue - Zackery, could you update your PR and NEWS entry?

I just spent way too long looking for a MoveFileEx call that doesn't exist, because this isn't actually about doing things on reboot :)

For tests, you should be able to create your own REG_MULTI_SZ key with zero-length strings and read it back. If the winreg module won't let you do it, you may need ctypes (but that's okay in Windows-only tests).

Alternatively, if you want to dive deeper into the C API code, you could expose the fixupMultiSz function as a private function (winreg._split_multi_sz) and test it directly. That's my preferred way of unit testing things like this, but it's a decent amount of boilerplate just for a test.
History
Date User Action Args
2019-05-13 15:54:04steve.dowersetrecipients: + steve.dower, paul.moore, tim.golden, zach.ware, eryksun, ZackerySpytz, nanonyme
2019-05-13 15:54:04steve.dowersetmessageid: <1557762844.59.0.647338289606.issue32587@roundup.psfhosted.org>
2019-05-13 15:54:04steve.dowerlinkissue32587 messages
2019-05-13 15:54:04steve.dowercreate