Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(85218)

Unified Diff: Lib/test/test_winreg.py

Issue 16510: Using appropriate checks in tests
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/test/test_weakset.py ('k') | Lib/test/test_with.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_winreg.py Fri Feb 07 17:53:13 2014 +0100
+++ b/Lib/test/test_winreg.py Fri Feb 07 23:40:05 2014 +0200
@@ -75,7 +75,7 @@
# Set the default value for this key.
SetValue(root_key, test_key_name, REG_SZ, "Default value")
key = CreateKey(root_key, test_key_name)
- self.assertTrue(key.handle != 0)
+ self.assertNotEqual(key.handle, 0)
# Create a sub-key
sub_key = CreateKey(key, subkeystr)
# Give the sub-key some named values
@@ -190,11 +190,11 @@
def _test_named_args(self, key, sub_key):
with CreateKeyEx(key=key, sub_key=sub_key, reserved=0,
access=KEY_ALL_ACCESS) as ckey:
- self.assertTrue(ckey.handle != 0)
+ self.assertNotEqual(ckey.handle, 0)
with OpenKeyEx(key=key, sub_key=sub_key, reserved=0,
access=KEY_ALL_ACCESS) as okey:
- self.assertTrue(okey.handle != 0)
+ self.assertNotEqual(okey.handle, 0)
class LocalWinregTests(BaseWinregTests):
« no previous file with comments | « Lib/test/test_weakset.py ('k') | Lib/test/test_with.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+