Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7ae60187
Commit
7ae60187
authored
Feb 07, 2010
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix another duplicated test method.
parent
ab3f5cba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
Lib/test/test_pep292.py
Lib/test/test_pep292.py
+6
-7
No files found.
Lib/test/test_pep292.py
View file @
7ae60187
...
...
@@ -86,13 +86,6 @@ class TestTemplate(unittest.TestCase):
s
=
Template
(
'$who likes $100'
)
raises
(
ValueError
,
s
.
substitute
,
dict
(
who
=
'tim'
))
def
test_delimiter_override
(
self
):
class
PieDelims
(
Template
):
delimiter
=
'@'
s
=
PieDelims
(
'@who likes to eat a bag of @{what} worth $100'
)
self
.
assertEqual
(
s
.
substitute
(
dict
(
who
=
'tim'
,
what
=
'ham'
)),
'tim likes to eat a bag of ham worth $100'
)
def
test_idpattern_override
(
self
):
class
PathPattern
(
Template
):
idpattern
=
r'[_a-z][._a-z0-9]*'
...
...
@@ -183,6 +176,12 @@ class TestTemplate(unittest.TestCase):
raises
(
ValueError
,
s
.
substitute
,
dict
(
gift
=
'bud'
,
who
=
'you'
))
eq
(
s
.
safe_substitute
(),
'this &gift is for &{who} &'
)
class
PieDelims
(
Template
):
delimiter
=
'@'
s
=
PieDelims
(
'@who likes to eat a bag of @{what} worth $100'
)
self
.
assertEqual
(
s
.
substitute
(
dict
(
who
=
'tim'
,
what
=
'ham'
)),
'tim likes to eat a bag of ham worth $100'
)
def
test_main
():
from
test
import
test_support
...
...
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