2007-01-25 | paulb | raw files shortlog changelog graph | Added local namespace version of tests. | |
tests/augassign.py (file) |
1.1 --- a/tests/augassign.py Wed Jan 24 00:46:27 2007 +0100 1.2 +++ b/tests/augassign.py Thu Jan 25 00:28:56 2007 +0100 1.3 @@ -24,7 +24,7 @@ 1.4 1.5 a += b 1.6 1.7 -a = A1() 1.8 +a = A1() # May augment types since this is a global namespace. 1.9 a.b += c 1.10 a.b[e:] += d 1.11 1.12 @@ -35,3 +35,27 @@ 1.13 a[e:f] += d 1.14 a[e] += c 1.15 a[e,f] += d 1.16 + 1.17 +def f(): 1.18 + a = [1,2,3] 1.19 + b = [4,5] 1.20 + c = [6] 1.21 + d = [] 1.22 + e = 1 1.23 + f = 2 1.24 + 1.25 + a += b 1.26 + 1.27 + a = A1() 1.28 + a.b += c 1.29 + a.b[e:] += d 1.30 + 1.31 + a = A2() 1.32 + a.b().c += d 1.33 + 1.34 + a = A4() 1.35 + a[e:f] += d 1.36 + a[e] += c 1.37 + a[e,f] += d 1.38 + 1.39 +f()