r13421 - AGX/agx.io.uml/trunk/src/agx/io/uml

"johannes raggam" <[email protected]>
Newsgroups gmane.comp.web.zope.plone.archetypes.cvs
Message-ID <[email protected]>
Author: thet
Date: Tue Jan 18 14:00:59 2011
New Revision: 13421

Modified:
   AGX/agx.io.uml/trunk/src/agx/io/uml/utils.py
   AGX/agx.io.uml/trunk/src/agx/io/uml/utils.txt
Log:
bugfix+test

Modified: AGX/agx.io.uml/trunk/src/agx/io/uml/utils.py
==============================================================================
--- AGX/agx.io.uml/trunk/src/agx/io/uml/utils.py	(original)
+++ AGX/agx.io.uml/trunk/src/agx/io/uml/utils.py	Tue Jan 18 14:00:59 2011
@@ -284,8 +284,7 @@
             normalized.append(list(reversed(tag.split(':'))))
         else:
             normalized.append((tag, stereotype))
-        # TODO: next code block can't work, apparently not tests catch it. FIX!
-        for alterative in alternatives:
+        for alternative in alternatives:
             if isinstance(alternative, tuple) or isinstance(alternative, list):
                normalized.append(alternative)
             else:
@@ -315,7 +314,7 @@
         ``alternatives``
           Look in more general elements also for stereotypes/tags in this list.
           Expects either a tuple ``tag, stereotype`` or a tag prefixed with
-          stereotyoe as described above. Lookup order: arguments, order of list,
+          stereotype as described above. Lookup order: arguments, order of list,
           first one hit wins.
 
         ``aggregate``

Modified: AGX/agx.io.uml/trunk/src/agx/io/uml/utils.txt
==============================================================================
--- AGX/agx.io.uml/trunk/src/agx/io/uml/utils.txt	(original)
+++ AGX/agx.io.uml/trunk/src/agx/io/uml/utils.txt	Tue Jan 18 14:00:59 2011
@@ -622,7 +622,13 @@
 
     >>> tgv.inherited('tgv2', 'sB', aggregate=False)
     'value two on class C1'
-    
+
+    >>> tgv.inherited('tgv2', 'sB', alternatives=[('tgv1', 'sA')])
+    ['value one on class C2', 'value two on class C1', 'value one on class C1']
+ 
+    >>> tgv.inherited('tgv1', 'sA', alternatives=['sB:tgv2',])
+    ['value one on class C2', 'value one on class C1', 'value two on class C1']
+
 Namespaced access walks up the UML namespace hierarchy.
 ::
 
@@ -631,4 +637,4 @@
 
 
     
-    
\ No newline at end of file
+    

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.