Skip to content

Commit

Permalink
Finally! I can edit PythonScripts via FTP and WebDAV with impunity :-)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjw296 committed Feb 10, 2002
1 parent 50542bd commit 6a8c876
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PythonScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Python code.
"""

__version__='$Revision: 1.39 $'[11:-2]
__version__='$Revision: 1.40 $'[11:-2]

import sys, os, traceback, re, marshal
from Globals import DTMLFile, MessageDialog, package_home
Expand Down Expand Up @@ -453,7 +453,7 @@ def read(self):

def params(self): return self._params
def body(self): return self._body
def get_size(self): return len(self._body)
def get_size(self): return len(self.read())
getSize = get_size

def PrincipiaSearchSource(self):
Expand Down
4 changes: 4 additions & 0 deletions tests/testPythonScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ def testBooleanMap(self):
true = self._newPS(readf('boolean_map'))()
assert true

def testGetSize(self):
f = self._newPS(readf('complex_print'))
self.assertEqual(f.get_size(),len(f.read()))

def test_suite():
suite = unittest.TestSuite()
suite.addTest( unittest.makeSuite( TestPythonScriptNoAq ) )
Expand Down

0 comments on commit 6a8c876

Please sign in to comment.