summaryrefslogtreecommitdiff
path: root/Lib/test/test_decorators.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-08-04 02:36:18 +0000
committerTim Peters <tim.peters@gmail.com>2004-08-04 02:36:18 +0000
commit6db15d7307b831766617f6a9700ecc4c75a16081 (patch)
treecbc747970fd7d68844de8abaca57c8102dc859b2 /Lib/test/test_decorators.py
parentcea2cc4a21e7e2ba84f6dc11682821e502bd1f5f (diff)
downloadcpython-git-6db15d7307b831766617f6a9700ecc4c75a16081.tar.gz
Whitespace normalization.
Diffstat (limited to 'Lib/test/test_decorators.py')
-rw-r--r--Lib/test/test_decorators.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/test/test_decorators.py b/Lib/test/test_decorators.py
index ef40e17fad..dbe45cf3fd 100644
--- a/Lib/test/test_decorators.py
+++ b/Lib/test/test_decorators.py
@@ -22,8 +22,8 @@ class DbcheckError (Exception):
# A real version of this would set attributes here
Exception.__init__(self, "dbcheck %r failed (func=%s args=%s kwds=%s)" %
(exprstr, func, args, kwds))
-
-
+
+
def dbcheck(exprstr, globals=None, locals=None):
"Decorator to implement debugging assertions"
def decorate(func):
@@ -66,7 +66,7 @@ def memoize(func):
# Unhashable argument
return func(*args)
return call
-
+
# -----------------------------------------------
class TestDecorators(unittest.TestCase):
@@ -80,7 +80,7 @@ class TestDecorators(unittest.TestCase):
def test_staticmethod_function(self):
@staticmethod
- def notamethod(x):
+ def notamethod(x):
return x
self.assertRaises(TypeError, notamethod, 1)
@@ -94,7 +94,7 @@ class TestDecorators(unittest.TestCase):
def test_argforms(self):
# A few tests of argument passing, as we use restricted form
# of expressions for decorators.
-
+
def noteargs(*args, **kwds):
def decorate(func):
setattr(func, 'dbval', (args, kwds))
@@ -129,7 +129,7 @@ class TestDecorators(unittest.TestCase):
# XXX: This doesn't work unless memoize is the last decorator -
# see the comment in countcalls.
counts = {}
- @countcalls(counts) @memoize
+ @countcalls(counts) @memoize
def double(x):
return x * 2
@@ -157,7 +157,7 @@ class TestDecorators(unittest.TestCase):
for expr in [ "1+2", "x[3]", "(1, 2)" ]:
# Sanity check: is expr is a valid expression by itself?
compile(expr, "testexpr", "exec")
-
+
codestr = "@%s\ndef f(): pass" % expr
self.assertRaises(SyntaxError, compile, codestr, "test", "exec")
@@ -166,7 +166,7 @@ class TestDecorators(unittest.TestCase):
def unimp(func):
raise NotImplementedError
context = dict(nullval=None, unimp=unimp)
-
+
for expr, exc in [ ("undef", NameError),
("nullval", TypeError),
("nullval.attr", AttributeError),