[Checkins] SVN: gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/ pep8-ify

Jan-Wijbrand Kolman janwijbrand at gmail.com
Mon Jun 14 02:02:22 EDT 2010


Log message for revision 113439:
  pep8-ify

Changed:
  U   gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/base.py
  U   gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/tests/test_util.py
  U   gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/util.py
  U   gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/ztk/__init__.py
  U   gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/ztk/tests/test_selenese.py
  U   gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/ztk/tests/test_ztk.py

-=-
Modified: gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/base.py
===================================================================
--- gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/base.py	2010-06-14 05:59:48 UTC (rev 113438)
+++ gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/base.py	2010-06-14 06:02:21 UTC (rev 113439)
@@ -15,6 +15,7 @@
 import gocept.selenium.selenese
 import selenium
 
+
 class Layer(object):
 
     # override in subclass:

Modified: gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/tests/test_util.py
===================================================================
--- gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/tests/test_util.py	2010-06-14 05:59:48 UTC (rev 113438)
+++ gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/tests/test_util.py	2010-06-14 06:02:21 UTC (rev 113439)
@@ -16,19 +16,23 @@
 from gocept.selenium.base import Layer
 from gocept.selenium.util import make_testsuite
 
+
 class MakeTestSuiteTestCase(unittest.TestCase):
     layer = Layer()
 
     def test_one_two_three(self):
         self.assert_(True)
 
+
 class Another(unittest.TestCase):
     def test_four_five(self):
         self.assert_(True)
 
+
 class SubFromMakeTestSuiteTestCase(MakeTestSuiteTestCase):
     layer = Layer()
 
+
 class MakeTestSuite(unittest.TestCase):
 
     def test_make_testsuite(self):
@@ -64,7 +68,9 @@
         for test in tests:
             self.assertEquals('192.168.1.2', test._server)
 
+
 def test_suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(MakeTestSuite))
+    suite.addTest(
+        unittest.defaultTestLoader.loadTestsFromTestCase(MakeTestSuite))
     return suite

Modified: gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/util.py
===================================================================
--- gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/util.py	2010-06-14 05:59:48 UTC (rev 113438)
+++ gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/util.py	2010-06-14 06:02:21 UTC (rev 113439)
@@ -1,6 +1,6 @@
 #############################################################################
 #
-# Copyright (c) 2009-2010 Zope Foundation and Contributors.
+# Copyright (c) 2010 Zope Foundation and Contributors.
 # All Rights Reserved.
 #
 # This software is subject to the provisions of the Zope Public License,
@@ -14,6 +14,7 @@
 
 import unittest
 
+
 def _testcases_for_browser(testcases, browser, app_host, selenium_server):
     suite = unittest.TestSuite()
     for testcase in testcases:
@@ -24,11 +25,13 @@
         # Create a new test class, subclassing the original test case. The
         # name of this new class reflects what browser is used.
         new_testcase = type(
-            testcase.__name__+'_'+browser, (testcase,), {'browser': browser})
+            testcase.__name__ + '_' + browser, (testcase,),
+            {'browser': browser})
         suite.addTests(
             unittest.defaultTestLoader.loadTestsFromTestCase(new_testcase))
     return suite
 
+
 def make_testsuite(testcases, browsers, app_host=None, selenium_server=None):
     """Creates a test suite, where each of the given test cases is replicated
     for each of the given browser names.

Modified: gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/ztk/__init__.py
===================================================================
--- gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/ztk/__init__.py	2010-06-14 05:59:48 UTC (rev 113438)
+++ gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/ztk/__init__.py	2010-06-14 06:02:21 UTC (rev 113439)
@@ -75,4 +75,4 @@
     zope.server.http.wsgihttpserver.WSGIHTTPServer,
     SwitchableDBApplication,
     zope.server.http.commonaccesslogger.CommonAccessLogger,
-    8087, True) # The port number here is just the default value
+    8087, True)  # The port number here is just the default value

Modified: gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/ztk/tests/test_selenese.py
===================================================================
--- gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/ztk/tests/test_selenese.py	2010-06-14 05:59:48 UTC (rev 113438)
+++ gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/ztk/tests/test_selenese.py	2010-06-14 06:02:21 UTC (rev 113439)
@@ -64,6 +64,7 @@
         class Selenese(gocept.selenium.selenese.Selenese):
             def get_without_assert_type(self):
                 pass
+
             @gocept.selenium.selenese.assert_type('wrong_type')
             def get_with_wrong_assert_type(self):
                 pass

Modified: gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/ztk/tests/test_ztk.py
===================================================================
--- gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/ztk/tests/test_ztk.py	2010-06-14 05:59:48 UTC (rev 113438)
+++ gocept.selenium/branches/jw-move-selenium-browser-to-testcasebase/src/gocept/selenium/ztk/tests/test_ztk.py	2010-06-14 06:02:21 UTC (rev 113439)
@@ -15,6 +15,7 @@
 import gocept.selenium.ztk.testing
 import gocept.selenium.tests.isolation
 
+
 class ZTKTests(gocept.selenium.tests.isolation.IsolationTests,
                gocept.selenium.ztk.testing.TestCase):
 



More information about the checkins mailing list