From 73aee40542e00c51eb0369e37211748bd0b03448 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 11 Oct 2008 09:44:12 +0000 Subject: [thorstenp] replace none equality test with identity test --- test/lib/mock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/lib') diff --git a/test/lib/mock.py b/test/lib/mock.py index 5d6348b1a..c4a4e6332 100644 --- a/test/lib/mock.py +++ b/test/lib/mock.py @@ -116,7 +116,7 @@ class Mock: raise a MockInterfaceError. Based on the Python 2.3.3 Reference Manual section 5.3.4: Calls. """ - if self.realClassMethods == None: + if self.realClassMethods is None: return if name not in self.realClassMethods: raise MockInterfaceError("Calling mock method '%s' that was not found in the original class" % name) @@ -411,7 +411,7 @@ def NOT(cond): def MATCHES(regex, *args, **kwargs): compiled_regex = re.compile(regex, *args, **kwargs) def testFn(param): - return compiled_regex.match(param) != None + return compiled_regex.match(param) is not None return testFn def SEQ(*sequence): -- cgit v1.2.3