[issue32587] Make REG_MULTI_SZ support zero-length strings
Steve Dower
report at bugs.python.org
Mon May 13 11:54:04 EDT 2019
Steve Dower <steve.dower at python.org> added the comment:
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.
----------
title: Make REG_MULTI_SZ support PendingFileRenameOperations -> Make REG_MULTI_SZ support zero-length strings
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32587>
_______________________________________
More information about the Python-bugs-list
mailing list