Skip to content

Commit

Permalink
o Land unit test cleanup from branch.
Browse files Browse the repository at this point in the history
  o Known breakage as of 2001/10/17:

    - TAL test suite is very broken (TAL is currently suppressed in
      lib/python/.testinfo).

    - AccessControl tests don't run if run first;  lib/python/.testinfo
      pushes them to the end of the queue, at which point they *do* run.
      Global side effects suck!

    - lib/python/BTrees/testBTreesUnicode.py:  weird flakiness around
      comparison of ASCII and Unicode strings;  breaks in different
      ways under Python 2.1 and 2.2.

    - lib/python/Products/PageTemplates/tests:  three tests break due
      to security asserctions.
  • Loading branch information
tseaver committed Oct 17, 2001
1 parent 8ac67f5 commit f44c565
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 122 deletions.
118 changes: 0 additions & 118 deletions tests/framework.py

This file was deleted.

27 changes: 23 additions & 4 deletions tests/testPythonScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,29 @@
# attributions are listed in the accompanying credits file.
#
##############################################################################
import os, sys
execfile(os.path.join(sys.path[0], 'framework.py'))
import os, sys, unittest

import ZODB
from Products.PythonScripts.PythonScript import PythonScript
from AccessControl.SecurityManagement import newSecurityManager

newSecurityManager(None, None)

if __name__=='__main__':
sys.path.append(os.path.join(os.pardir, os.pardir, os.pardir))
here = os.curdir
else:
from Products.PythonScripts import tests
from App.Common import package_home
here = package_home(tests.__dict__)

# Test Classes

def readf(name):
return open('tscripts/%s%s' % (name, '.ps'), 'r').read()
return open( os.path.join( here
, 'tscripts'
, '%s.ps' % name
), 'r').read()

class TestPythonScriptNoAq(unittest.TestCase):
def _newPS(self, txt, bind=None):
Expand Down Expand Up @@ -208,5 +218,14 @@ def testBooleanMap(self):
true = self._newPS(readf('boolean_map'))()
assert true

framework()
def test_suite():
suite = unittest.TestSuite()
suite.addTest( unittest.makeSuite( TestPythonScriptNoAq ) )
return suite

def main():
unittest.TextTestRunner().run(test_suite())

if __name__ == '__main__':
main()

0 comments on commit f44c565

Please sign in to comment.