8000 bpo-43984: Update winreg.SetValueEx to make sure the value set is not -1 by shreyanavigyan · Pull Request #25775 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-43984: Update winreg.SetValueEx to make sure the value set is not -1 #25775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Dec 9, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test case for REG_QWORD
  • Loading branch information
shreyanavigyan committed May 9, 2021
commit dbe8651eddeaf01cb609da94e390002abf43bafb
8 changes: 5 additions & 3 deletions Lib/test/test_winreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,11 @@ def test_setvalueex_negative_one_check(self):
try:
with CreateKey(HKEY_CURRENT_USER, test_key_name) as ck:
with self.assertRaises(OverflowError):
SetValueEx(ck, "test_name", None, REG_DWORD, -1)
with self.assertRaises(FileNotFoundError):
QueryValueEx(ck, "test_name")
SetValueEx(ck, "test_name_dword", None, REG_DWORD, -1)
SetValueEx(ck, "test_name_qword", None, REG_QWORD, -1)
self.assertRaises(FileNotFoundError, QueryValueEx, ck, "test_name_dword")
self.assertRaises(FileNotFoundError, QueryValueEx, ck, "test_name_qword")

finally:
DeleteKey(HKEY_CURRENT_USER, test_key_name)

Expand Down
0