changeset 4958:897840f96acc

fix PEP8 issues in wikiutil.Version tests
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 22 Aug 2009 15:11:20 +0200
parents fba959635dcd
children 18474c316dd7 2649f3f0fabd
files MoinMoin/_tests/test_wikiutil.py
diffstat 1 files changed, 28 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_wikiutil.py	Fri Aug 21 23:36:54 2009 +0200
+++ b/MoinMoin/_tests/test_wikiutil.py	Sat Aug 22 15:11:20 2009 +0200
@@ -1044,46 +1044,46 @@
     def test_Version(self):
         Version = wikiutil.Version
         # test properties
-        assert Version(1,2,3).major == 1
-        assert Version(1,2,3).minor == 2
-        assert Version(1,2,3).release == 3
-        assert Version(1,2,3,'4.5alpha6').additional == '4.5alpha6'
+        assert Version(1, 2, 3).major == 1
+        assert Version(1, 2, 3).minor == 2
+        assert Version(1, 2, 3).release == 3
+        assert Version(1, 2, 3, '4.5alpha6').additional == '4.5alpha6'
         # test Version init and Version to str conversion
         assert str(Version(1)) == "1.0.0"
-        assert str(Version(1,2)) == "1.2.0"
-        assert str(Version(1,2,3)) == "1.2.3"
-        assert str(Version(1,2,3,'4.5alpha6')) == "1.2.3-4.5alpha6"
+        assert str(Version(1, 2)) == "1.2.0"
+        assert str(Version(1, 2, 3)) == "1.2.3"
+        assert str(Version(1, 2, 3, '4.5alpha6')) == "1.2.3-4.5alpha6"
         assert str(Version(version='1.2.3')) == "1.2.3"
         assert str(Version(version='1.2.3-4.5alpha6')) == "1.2.3-4.5alpha6"
         # test Version comparison, trivial cases
         assert Version() == Version()
         assert Version(1) == Version(1)
-        assert Version(1,2) == Version(1,2)
-        assert Version(1,2,3) == Version(1,2,3)
-        assert Version(1,2,3,'foo') == Version(1,2,3,'foo')
+        assert Version(1, 2) == Version(1, 2)
+        assert Version(1, 2, 3) == Version(1, 2, 3)
+        assert Version(1, 2, 3, 'foo') == Version(1, 2, 3, 'foo')
         assert Version(1) != Version(2)
-        assert Version(1,2) != Version(1,3)
-        assert Version(1,2,3) != Version(1,2,4)
-        assert Version(1,2,3,'foo') != Version(1,2,3,'bar')
+        assert Version(1, 2) != Version(1, 3)
+        assert Version(1, 2, 3) != Version(1, 2, 4)
+        assert Version(1, 2, 3, 'foo') != Version(1, 2, 3, 'bar')
         assert Version(1) < Version(2)
-        assert Version(1,2) < Version(1,3)
-        assert Version(1,2,3) < Version(1,2,4)
-        assert Version(1,2,3,'bar') < Version(1,2,3,'foo')
+        assert Version(1, 2) < Version(1, 3)
+        assert Version(1, 2, 3) < Version(1, 2, 4)
+        assert Version(1, 2, 3, 'bar') < Version(1, 2, 3, 'foo')
         assert Version(2) > Version(1)
-        assert Version(1,3) > Version(1,2)
-        assert Version(1,2,4) > Version(1,2,3)
-        assert Version(1,2,3,'foo') > Version(1,2,3,'bar')
+        assert Version(1, 3) > Version(1, 2)
+        assert Version(1, 2, 4) > Version(1, 2, 3)
+        assert Version(1, 2, 3, 'foo') > Version(1, 2, 3, 'bar')
         # test Version comparison, more delicate cases
-        assert Version(1,12) > Version(1,9)
-        assert Version(1,12) > Version(1,1,2)
-        assert Version(1,0,0,'0.0a2') > Version(1,0,0,'0.0a1')
-        assert Version(1,0,0,'0.0b1') > Version(1,0,0,'0.0a9')
-        assert Version(1,0,0,'0.0b2') > Version(1,0,0,'0.0b1')
-        assert Version(1,0,0,'0.0c1') > Version(1,0,0,'0.0b9')
-        assert Version(1,0,0,'1') > Version(1,0,0,'0.0c9')
+        assert Version(1, 12) > Version(1, 9)
+        assert Version(1, 12) > Version(1, 1, 2)
+        assert Version(1, 0, 0, '0.0a2') > Version(1, 0, 0, '0.0a1')
+        assert Version(1, 0, 0, '0.0b1') > Version(1, 0, 0, '0.0a9')
+        assert Version(1, 0, 0, '0.0b2') > Version(1, 0, 0, '0.0b1')
+        assert Version(1, 0, 0, '0.0c1') > Version(1, 0, 0, '0.0b9')
+        assert Version(1, 0, 0, '1') > Version(1, 0, 0, '0.0c9')
         # test Version playing nice with tuples
-        assert Version(1,2,3) == (1,2,3,'')
-        assert Version(1,2,4) > (1,2,3)
+        assert Version(1, 2, 3) == (1, 2, 3, '')
+        assert Version(1, 2, 4) > (1, 2, 3)
 
 
 coverage_modules = ['MoinMoin.wikiutil']