]> granicus.if.org Git - python/commitdiff
Whitespace normalization.
authorTim Peters <tim.peters@gmail.com>
Thu, 29 Mar 2001 04:36:09 +0000 (04:36 +0000)
committerTim Peters <tim.peters@gmail.com>
Thu, 29 Mar 2001 04:36:09 +0000 (04:36 +0000)
Lib/socket.py
Lib/symtable.py
Lib/test/test_pty.py
Lib/test/test_zipfile.py
Lib/traceback.py
Lib/unittest.py
Lib/zipfile.py

index 7cd788944687d6642523442cda28bc1c69ee4e8a..d0f09111a9e6a35b3aab6bf3e08d2f3a5dbb9936 100644 (file)
@@ -63,7 +63,7 @@ if (sys.platform.lower().startswith("win")
         def ssl(sock, keyfile=None, certfile=None):
             if hasattr(sock, "_sock"):
                 sock = sock._sock
-            return _realsslcall(sock, keyfile, certfile)    
+            return _realsslcall(sock, keyfile, certfile)
 
 
 # WSA error codes
index 6401d51831b31484d8815d6df48ead21de81d8ce..135cd569b6ff980c181e435c393d0d97fcf4d485 100644 (file)
@@ -34,7 +34,7 @@ class SymbolTableFactory:
         return obj
 
 newSymbolTable = SymbolTableFactory()
-    
+
 def bool(x):
     """Helper to force boolean result to 1 or 0"""
     if x:
@@ -60,7 +60,7 @@ class SymbolTable:
             kind = ""
         else:
             kind = "%s " % self.__class__.__name__
-        
+
         if self._table.name == "global":
             return "<%sSymbolTable for module %s>" % (kind, self._filename)
         else:
@@ -143,7 +143,7 @@ class Function(SymbolTable):
         if self.__locals is None:
             self.__locals = self.__idents_matching(lambda x:x & DEF_BOUND)
         return self.__locals
-        
+
     def get_globals(self):
         if self.__globals is None:
             glob = DEF_GLOBAL | DEF_FREE_GLOBAL
@@ -186,7 +186,7 @@ class Symbol:
         return bool(self.__flags & DEF_PARAM)
 
     def is_global(self):
-        return bool((self.__flags & DEF_GLOBAL) 
+        return bool((self.__flags & DEF_GLOBAL)
                     or (self.__flags & DEF_FREE_GLOBAL))
 
     def is_vararg(self):
index 9b957547954439af7a8e57d7db3df623d5c9362a..b119f6275fa199f36de320284952e75ad24433c4 100644 (file)
@@ -60,7 +60,7 @@ if pid == pty.CHILD:
         os._exit(3)
 
     # After pty.fork(), the child should already be a session leader.
-    # (on those systems that have that concept.) 
+    # (on those systems that have that concept.)
     debug("In child, calling os.setsid()")
     try:
         os.setsid()
index 8da74f58bd0821e08ecb29ec6efca71f9f87259d..50b8b36a859e72fb44c3f46f757742c00497f429 100644 (file)
@@ -10,12 +10,12 @@ def zipTest(f, compression, srccontents):
     zip.write(srcname, "another.name")
     zip.write(srcname, srcname)
     zip.close()
-            
+
     zip = zipfile.ZipFile(f, "r", compression)   # Read the ZIP archive
     readData2 = zip.read(srcname)
     readData1 = zip.read("another.name")
     zip.close()
-    
+
     if readData1 != srccontents or readData2 != srccontents:
         raise TestFailed, "Written data doesn't equal read data."
 
@@ -25,11 +25,11 @@ try:
     for i in range(0, 1000):
         fp.write("Test of zipfile line %d.\n" % i)
     fp.close()
-    
+
     fp = open(srcname, "rb")
     writtenData = fp.read()
     fp.close()
-    
+
     for file in (zipname, tempfile.TemporaryFile(), StringIO.StringIO()):
         zipTest(file, zipfile.ZIP_STORED, writtenData)
 
index 82906a325f059c1eac4779b0904a1e75829fd13a..a758349f91f1e99aacc0073b759e1ce78856df5b 100644 (file)
@@ -221,7 +221,7 @@ def print_last(limit=None, file=None):
 
 def print_stack(f=None, limit=None, file=None):
     """Print a stack trace from its invocation point.
-    
+
     The optional 'f' argument can be used to specify an alternate
     stack frame at which to start. The optional 'limit' and 'file'
     arguments have the same meaning as for print_exception().
index 850c38e96820ddfdae809e8dfa99bff6ecfbd880..eac5e78a11589a5e78991d1978894179d944cc17 100644 (file)
@@ -103,7 +103,7 @@ class TestResult:
     def stop(self):
         "Indicates that the tests should be aborted"
         self.shouldStop = 1
-    
+
     def __repr__(self):
         return "<%s run=%i errors=%i failures=%i>" % \
                (self.__class__, self.testsRun, len(self.errors),
@@ -116,12 +116,12 @@ class TestCase:
     By default, the test code itself should be placed in a method named
     'runTest'.
 
-    If the fixture may be used for many test cases, create as 
+    If the fixture may be used for many test cases, create as
     many test methods as are needed. When instantiating such a TestCase
     subclass, specify in the constructor arguments the name of the test method
     that the instance is to execute.
 
-    Test authors should subclass TestCase for their own tests. Construction 
+    Test authors should subclass TestCase for their own tests. Construction
     and deconstruction of the test's environment ('fixture') can be
     implemented by overriding the 'setUp' and 'tearDown' methods respectively.
 
@@ -480,7 +480,7 @@ class _WritelnDecorator:
     def writeln(self, *args):
         if args: apply(self.write, args)
         self.write('\n') # text-mode streams translate to \r\n if needed
+
 
 class _TextTestResult(TestResult):
     """A test result class that can print formatted text results to a stream.
@@ -550,7 +550,7 @@ class _TextTestResult(TestResult):
 
 class TextTestRunner:
     """A test runner class that displays results in textual form.
-    
+
     It prints out the names of tests as they are run, errors as they
     occur, and a summary of the results at the end of the test run.
     """
@@ -587,7 +587,7 @@ class TextTestRunner:
         else:
             self.stream.writeln("OK")
         return result
-        
+
 
 
 ##############################################################################
@@ -668,7 +668,7 @@ Examples:
         if self.testRunner is None:
             self.testRunner = TextTestRunner(verbosity=self.verbosity)
         result = self.testRunner.run(self.test)
-        sys.exit(not result.wasSuccessful())    
+        sys.exit(not result.wasSuccessful())
 
 main = TestProgram
 
index bf59043058d53c5ecac7286e287868b4600bd447..b638592a7a3ec26e2cedbeaf68f88d3ed33ff7d9 100644 (file)
@@ -131,10 +131,10 @@ class ZipInfo:
 
 
 class ZipFile:
-    """ Class with methods to open, read, write, close, list zip files. 
-     
+    """ Class with methods to open, read, write, close, list zip files.
+
     z = ZipFile(file, mode="r", compression=ZIP_STORED)
-     
+
     file: Either the path to the file, or a file-like object.
           If it is a path, the file will be opened and closed by ZipFile.
     mode: The mode can be either read "r", write "w" or append "a".
@@ -158,7 +158,7 @@ class ZipFile:
         self.filelist = []      # List of ZipInfo instances for archive
         self.compression = compression  # Method of compression
         self.mode = key = mode[0]
-        
+
         # Check if we were passed a file-like object
         if type(file) in _STRING_TYPES:
             self._filePassed = 0
@@ -169,7 +169,7 @@ class ZipFile:
             self._filePassed = 1
             self.fp = file
             self.filename = getattr(file, 'name', None)
-        
+
         if key == 'r':
             self._GetContents()
         elif key == 'w':