[Checkins] SVN: gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/ pep8

Jan-Jaap Driessen jdriessen at thehealthagency.com
Tue Nov 9 12:03:19 EST 2010


Log message for revision 118306:
  pep8

Changed:
  U   gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/base.py
  U   gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/__init__.py
  U   gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/fixtures.py
  U   gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/tests.py
  U   gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/static/__init__.py
  U   gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/__init__.py
  U   gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/testing.py
  U   gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/tests.py

-=-
Modified: gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/base.py
===================================================================
--- gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/base.py	2010-11-09 15:58:25 UTC (rev 118305)
+++ gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/base.py	2010-11-09 17:03:18 UTC (rev 118306)
@@ -38,19 +38,24 @@
     return os.environ.get(SELENIUM_SERVER_HOST_KEY,
                           SELENIUM_SERVER_HOST_DEFAULT)
 
+
 def _selenium_server_port():
     return int(os.environ.get(SELENIUM_SERVER_PORT_KEY,
                               SELENIUM_SERVER_PORT_DEFAULT))
 
+
 def _browser():
     return os.environ.get(BROWSER_KEY, BROWSER_DEFAULT)
 
+
 def _app_host():
     return os.environ.get(APP_HOST_KEY, APP_HOST_DEFAULT)
 
+
 def _app_port():
     return int(os.environ.get(APP_PORT_KEY, '5698'))
 
+
 def _speed():
     return os.environ.get(SPEED_KEY)
 

Modified: gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/__init__.py
===================================================================
--- gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/__init__.py	2010-11-09 15:58:25 UTC (rev 118305)
+++ gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/__init__.py	2010-11-09 17:03:18 UTC (rev 118306)
@@ -20,6 +20,7 @@
 import gocept.selenium.selenese
 from gocept.selenium.wsgi import WSGILayer
 
+
 class GrokLayer(ZODBLayer, WSGILayer):
 
     application = WSGIPublisherApplication()

Modified: gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/fixtures.py
===================================================================
--- gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/fixtures.py	2010-11-09 15:58:25 UTC (rev 118305)
+++ gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/fixtures.py	2010-11-09 17:03:18 UTC (rev 118306)
@@ -14,12 +14,12 @@
 
 import grok
 
+
 class App(grok.Model):
     pass
 
+
 class Index(grok.View):
 
     def render(self):
         return '''<html><body>Hello from grok</body></html>'''
-
-

Modified: gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/tests.py
===================================================================
--- gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/tests.py	2010-11-09 15:58:25 UTC (rev 118305)
+++ gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/tests.py	2010-11-09 17:03:18 UTC (rev 118306)
@@ -17,6 +17,7 @@
 from gocept.selenium.grok import GrokLayer
 from gocept.selenium.grok.fixtures import App
 
+
 class TestGrokTestCase(gocept.selenium.grok.TestCase):
 
     layer = GrokLayer(gocept.selenium.grok)
@@ -34,4 +35,3 @@
     def test_grok_app(self):
         self.selenium.open('/app')
         self.selenium.assertTextPresent('Hello from grok')
-

Modified: gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/static/__init__.py
===================================================================
--- gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/static/__init__.py	2010-11-09 15:58:25 UTC (rev 118305)
+++ gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/static/__init__.py	2010-11-09 17:03:18 UTC (rev 118306)
@@ -41,8 +41,8 @@
         # "documentroot".
         # The rest of the method's implementation is copied verbatim from
         # SimpleHTTPServer.SimpleHTTPRequestHandler.
-        path = path.split('?',1)[0]
-        path = path.split('#',1)[0]
+        path = path.split('?', 1)[0]
+        path = path.split('#', 1)[0]
         path = posixpath.normpath(urllib.unquote(path))
         words = path.split('/')
         words = filter(None, words)
@@ -51,7 +51,8 @@
         for word in words:
             drive, word = os.path.splitdrive(word)
             head, word = os.path.split(word)
-            if word in (os.curdir, os.pardir): continue
+            if word in (os.curdir, os.pardir):
+                continue
             path = os.path.join(path, word)
         return path
 

Modified: gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/__init__.py
===================================================================
--- gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/__init__.py	2010-11-09 15:58:25 UTC (rev 118305)
+++ gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/__init__.py	2010-11-09 17:03:18 UTC (rev 118306)
@@ -25,7 +25,7 @@
 
     # Add conditional logging to handler.
     def log_request(self, *args):
-        if os.environ.has_key('GOCEPT_SELENIUM_VERBOSE_LOGGING'):
+        if 'GOCEPT_SELENIUM_VERBOSE_LOGGING' in os.environ:
             WSGIRequestHandler.log_request(self, *args)
 
 

Modified: gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/testing.py
===================================================================
--- gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/testing.py	2010-11-09 15:58:25 UTC (rev 118305)
+++ gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/testing.py	2010-11-09 17:03:18 UTC (rev 118306)
@@ -11,6 +11,8 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
+
+
 def simple_app(environ, start_response):
     path = environ['PATH_INFO']
 

Modified: gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/tests.py
===================================================================
--- gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/tests.py	2010-11-09 15:58:25 UTC (rev 118305)
+++ gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/tests.py	2010-11-09 17:03:18 UTC (rev 118306)
@@ -15,6 +15,7 @@
 import gocept.selenium.wsgi
 from gocept.selenium.wsgi.testing import simple_app
 
+
 class TestWSGITestCase(gocept.selenium.wsgi.TestCase):
 
     layer = gocept.selenium.wsgi.WSGILayer(application=simple_app)
@@ -25,4 +26,3 @@
     def test_simple_app(self):
         self.selenium.open('/')
         self.selenium.assertTextPresent('Hello from javascript')
-



More information about the checkins mailing list