Skip to content

Commit

Permalink
Fix test so that is creates a new user folder, rather than borrowing …
Browse files Browse the repository at this point in the history
…the one *ac

tually in the root*. This could cause the tests to fail if you had a user folder with any users in it.
  • Loading branch information
caseman committed Apr 29, 2004
1 parent f5b13da commit edad6a5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
14 changes: 5 additions & 9 deletions DT_Util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
'''$Id: DT_Util.py,v 1.91 2003/12/26 23:43:11 jeremy Exp $'''
__version__='$Revision: 1.91 $'[11:-2]
"""DTML Utilities
$Id: DT_Util.py,v 1.92 2004/04/29 21:17:08 caseman Exp $"""

import re

from html_quote import html_quote, ustr # for import by other modules, dont remove!
from RestrictedPython.Guards import safe_builtins
from RestrictedPython.Utilities import utility_builtins
from RestrictedPython.Eval import RestrictionCapableEval
from cDocumentTemplate import InstanceDict, TemplateDict, \
render_blocks, safe_callable, join_unicode

test = utility_builtins['test'] # for backwards compatibility, dont remove!

Expand All @@ -40,13 +43,6 @@ def int_param(params,md,name,default=0, st=type('')):
v = int(v)
return v or 0

try:
from cDocumentTemplate import InstanceDict, TemplateDict, \
render_blocks, safe_callable, join_unicode
except:
from pDocumentTemplate import InstanceDict, TemplateDict, \
render_blocks, safe_callable, join_unicode

functype = type(int_param)
class NotBindable:
# Used to prevent TemplateDict from trying to bind to functions.
Expand Down
12 changes: 10 additions & 2 deletions pDocumentTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,21 @@
##############################################################################
"""Python implementations of document template some features
$Id: pDocumentTemplate.py,v 1.41 2002/09/24 22:25:57 jeremy Exp $"""
__version__='$Revision: 1.41 $'[11:-2]
XXX This module is no longer actively used, but is left as an
XXX implementation reference for cDocumentTemplate
$Id: pDocumentTemplate.py,v 1.42 2004/04/29 21:17:08 caseman Exp $"""
__version__='$Revision: 1.42 $'[11:-2]

import sys, types
from types import StringType, UnicodeType, TupleType
from ustr import ustr

import warnings
warnings.warn('pDocumentTemplate is not longer in active use. '
'It remains only as an implementation reference.',
DeprecationWarning)

ClassTypes = [types.ClassType]

try:
Expand Down

0 comments on commit edad6a5

Please sign in to comment.