# HG changeset patch # User Paul Boddie # Date 1284234324 -7200 # Node ID d5ee53c83a45b15f0bcfb74cb5d79032427364a9 # Parent d5d8fa019db3db62729861c95314a97e809cbe8a Updated the comments in attribute usage tests. diff -r d5d8fa019db3 -r d5ee53c83a45 tests/attribute_access_type_restriction_conditional.py --- a/tests/attribute_access_type_restriction_conditional.py Fri Sep 10 00:27:49 2010 +0200 +++ b/tests/attribute_access_type_restriction_conditional.py Sat Sep 11 21:45:24 2010 +0200 @@ -25,6 +25,7 @@ return 5 def test_conditional(obj): + # obj: f, g; f if obj.f(): obj.g() return 2 diff -r d5d8fa019db3 -r d5ee53c83a45 tests/attribute_access_type_restriction_conditional_choice.py --- a/tests/attribute_access_type_restriction_conditional_choice.py Fri Sep 10 00:27:49 2010 +0200 +++ b/tests/attribute_access_type_restriction_conditional_choice.py Sat Sep 11 21:45:24 2010 +0200 @@ -19,12 +19,11 @@ return 5 def test_conditional(obj): - # obj: C, D, E (f) - if obj.f(): # C, D, E (f) - return obj.g() # D (f, g) + # obj: f, g; f, h + if obj.f(): + return obj.g() else: - return obj.h() # E (f, h) - # # (f, g) ^ (f, h) + return obj.h() c = C() d = D() diff -r d5d8fa019db3 -r d5ee53c83a45 tests/attribute_access_type_restriction_conditional_choice_incompatible.py --- a/tests/attribute_access_type_restriction_conditional_choice_incompatible.py Fri Sep 10 00:27:49 2010 +0200 +++ b/tests/attribute_access_type_restriction_conditional_choice_incompatible.py Sat Sep 11 21:45:24 2010 +0200 @@ -12,12 +12,11 @@ return 3 def test_conditional(obj): - # obj: C, D (f) - if obj.f(): # C, D (f) - return obj.g() # D (f, g) + # obj: f, g; f + if obj.f(): + return obj.g() else: - return obj.f() # C (f) - # # (f, g) ^ (f) + return obj.f() c = C() d = D() diff -r d5d8fa019db3 -r d5ee53c83a45 tests/attribute_access_type_restriction_new.py --- a/tests/attribute_access_type_restriction_new.py Fri Sep 10 00:27:49 2010 +0200 +++ b/tests/attribute_access_type_restriction_new.py Sat Sep 11 21:45:24 2010 +0200 @@ -24,9 +24,9 @@ return 5 def test_new(obj, obj2): - # obj should provide f + # obj: f if obj.f(): - obj = obj2 # should provide f, g + obj = obj2 # obj: f, g obj.g() return obj.f() diff -r d5d8fa019db3 -r d5ee53c83a45 tests/attribute_access_type_restriction_new_conditional.py --- a/tests/attribute_access_type_restriction_new_conditional.py Fri Sep 10 00:27:49 2010 +0200 +++ b/tests/attribute_access_type_restriction_new_conditional.py Sat Sep 11 21:45:24 2010 +0200 @@ -19,14 +19,13 @@ return 5 def test_new_conditional(obj, obj2): - # obj: - # obj2: - if obj.f(): # C, D, E (f) - obj = obj2 # obj: D (g) - obj.g() # D (g) + # obj: f; f, h + if obj.f(): + obj = obj2 # obj: g + obj.g() else: - obj.h() # E (f, h) - # # (g) ^ (f, h) + obj.h() + return 5 c = C() diff -r d5d8fa019db3 -r d5ee53c83a45 tests/attribute_access_type_restriction_single.py --- a/tests/attribute_access_type_restriction_single.py Fri Sep 10 00:27:49 2010 +0200 +++ b/tests/attribute_access_type_restriction_single.py Sat Sep 11 21:45:24 2010 +0200 @@ -19,9 +19,9 @@ return 5 def test_one(obj): - # obj: D (f, g) - obj.f() # C, D, E (f) - return obj.g() # D (f, g) + # obj: f, g + obj.f() + return obj.g() c = C() d = D() diff -r d5d8fa019db3 -r d5ee53c83a45 tests/attribute_access_type_restriction_single_instance.py --- a/tests/attribute_access_type_restriction_single_instance.py Fri Sep 10 00:27:49 2010 +0200 +++ b/tests/attribute_access_type_restriction_single_instance.py Sat Sep 11 21:45:24 2010 +0200 @@ -24,9 +24,9 @@ return 5 def test_one(obj): - # obj: D (f, g) - obj.f() # C, D, E (f) - return obj.g # D (f, g) - instance only + # obj: f, g + obj.f() + return obj.g c = C() d = D(4)