Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
04edd680
Commit
04edd680
authored
Jul 09, 2003
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't raise a string exception; those trigger deprecation warnings in
Python 2.3.
parent
47c6f6a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
lib/python/DocumentTemplate/tests/testDTML.py
lib/python/DocumentTemplate/tests/testDTML.py
+7
-4
No files found.
lib/python/DocumentTemplate/tests/testDTML.py
View file @
04edd680
...
...
@@ -13,8 +13,8 @@
"""Document Template Tests
"""
__rcs_id__
=
'$Id: testDTML.py,v 1.1
4 2002/08/14 22:29:53 mj
Exp $'
__version__
=
'$Revision: 1.1
4
$'
[
11
:
-
2
]
__rcs_id__
=
'$Id: testDTML.py,v 1.1
5 2003/07/09 15:12:07 fdrake
Exp $'
__version__
=
'$Revision: 1.1
5
$'
[
11
:
-
2
]
import
sys
,
os
import
unittest
...
...
@@ -43,6 +43,9 @@ class D:
def
d
(
**
kw
):
return
kw
class
PukeError
(
Exception
):
"""Exception raised in test code."""
class
DTMLTests
(
unittest
.
TestCase
):
doc_class
=
HTML
...
...
@@ -353,7 +356,7 @@ foo bar
puke__roles__
=
None
# Public
def
puke
(
self
):
raise
'Puke'
,
'raaalf'
raise
PukeError
(
'raaalf'
)
html
=
self
.
doc_class
(
"""
...
...
@@ -366,7 +369,7 @@ foo bar
"""
)
try
:
html
(
spam
=
foo
())
except
'Puke'
:
except
PukeError
:
# Passed the test.
pass
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment