changeset 893:324b2948d197

some whitespace cleanup in the tests
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 06 Jul 2006 21:22:56 +0200
parents 9931a09387b0
children 48ec584812a1
files MoinMoin/_tests/test_widget_html.py MoinMoin/_tests/test_wikidicts.py MoinMoin/_tests/test_wikixml_marshal.py
diffstat 3 files changed, 18 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_widget_html.py	Thu Jul 06 21:16:28 2006 +0200
+++ b/MoinMoin/_tests/test_widget_html.py	Thu Jul 06 21:22:56 2006 +0200
@@ -48,13 +48,13 @@
 
         actions = (
             # action, data, expected
-            (element.append, 
+            (element.append,
              html.Text('Text & '),
              '<p>Text &amp; </p>'),
-            (element.append, 
+            (element.append,
              html.Text('more text. '),
              '<p>Text &amp; more text. </p>'),
-            (element.extend, 
+            (element.extend,
              (html.Text('And then '), html.Text('some.')),
              '<p>Text &amp; more text. And then some.</p>'),
             )
@@ -64,5 +64,4 @@
             result = unicode(element)
             self.assertEqual(result, expected,
                              'Expected "%(expected)s" but got "%(result)s"' % locals())
-            
 
--- a/MoinMoin/_tests/test_wikidicts.py	Thu Jul 06 21:16:28 2006 +0200
+++ b/MoinMoin/_tests/test_wikidicts.py	Thu Jul 06 21:22:56 2006 +0200
@@ -9,7 +9,7 @@
 import unittest
 import re
 
-from MoinMoin import wikidicts 
+from MoinMoin import wikidicts
 from MoinMoin import Page
 
 class GroupPageTestCase(unittest.TestCase):
@@ -61,12 +61,12 @@
  *   take this  
 """
         self.assertEqual(self.getMembers(text), ['take this'])
-        
+
     def getMembers(self, text):
         group = wikidicts.Group(self.request, '')
         group.initFromText(text)
         return group.members()
-        
+
 
 class DictPageTestCase(unittest.TestCase):
 
@@ -85,10 +85,10 @@
  Last:: last item
 '''
         d = wikidicts.Dict(self.request, '')
-        d.initFromText(text)        
+        d.initFromText(text)
         self.assertEqual(d['First'], 'first item')
         self.assertEqual(d['text with spaces'], 'second item')
-        self.assertEqual(d['Empty string'], '')        
+        self.assertEqual(d['Empty string'], '')
         self.assertEqual(d['Last'], 'last item')
 
 
@@ -106,4 +106,5 @@
         systemPages = wikidicts.Group(self.request, 'SystemPagesGroup')
         for member in systemPages.members():
             self.assert_(self.request.dicts.has_member('SystemPagesGroup', member),
-                         '%s should be in request.dict' % member)    
+                         '%s should be in request.dict' % member)
+
--- a/MoinMoin/_tests/test_wikixml_marshal.py	Thu Jul 06 21:16:28 2006 +0200
+++ b/MoinMoin/_tests/test_wikixml_marshal.py	Thu Jul 06 21:22:56 2006 +0200
@@ -12,7 +12,7 @@
 
 class MarshalTestCase(unittest.TestCase):
     """Testing Marshal used for ...XXX"""
-    
+
     class Data:
         cvar = 'Class Variable'
         def __init__(self, value):
@@ -28,22 +28,22 @@
         (1, '<data><prop>1</prop></data>'),
         (Data('value'), '<data><prop><data><ivar>value</ivar></data></prop></data>'),
         (array.array("i", [42]), "<data><prop>array('i', [42])</prop></data>"),
-        (buffer("0123456789", 2, 3),"<data><prop>234</prop></data>"),        
+        (buffer("0123456789", 2, 3), "<data><prop>234</prop></data>"),
         )
-        
+
     def setUp(self):
         self.obj = marshal.Marshal()
-        
+
     def testCreateMarshal(self):
         """wikixml.marshal: create new marshal"""
         self._checkData(self.obj, '<data></data>')
-        
+
     def testSetMarshalProperty(self):
         """wikixml.marshal: setting marshal property"""
         for value, xml in self.prop:
             self.obj.prop = value
             self._checkData(self.obj, xml)
-    
+
     def _canonize(self, xml):
         xml = xml.replace('\n', '')
         return xml
@@ -51,5 +51,6 @@
     def _checkData(self, obj, xml):
         objXML = self._canonize(obj.toXML())
         expected = self._canonize(xml)
-        self.assertEqual(objXML, expected, 
+        self.assertEqual(objXML, expected,
             'Expected "%(expected)s" but got "%(objXML)s"' % locals())
+