# HG changeset patch # User paulb@localhost.localdomain # Date 1169335029 -3600 # Node ID 6baf47498438bff8dae0c8751601dd7578df8ad6 # Parent e43147ec0cae09f49fb26c8017e8ac93c567161f Added tests for multiple instances and for local namespaces. diff -r e43147ec0cae -r 6baf47498438 tests/attr.py --- a/tests/attr.py Sat Jan 20 22:51:51 2007 +0100 +++ b/tests/attr.py Sun Jan 21 00:17:09 2007 +0100 @@ -10,3 +10,34 @@ else: a = B() a.x + +a1 = A() +a2 = A() +if x: + a1.x = 2 +else: + a2.x = "2" +a1.x +a2.x + +def test_subclass(): + x = 1 + if x: + a = A() + a.x = 2 + else: + a = B() + a.x + +def test_instances(): + a1 = A() + a2 = A() + if x: + a1.x = 2 + else: + a2.x = "2" + a1.x + a2.x + +test_subclass() +test_instances()