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
6c2cadb7
Commit
6c2cadb7
authored
Jun 23, 2007
by
Stefan H. Holek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide access to test globs in doctest setUp and tearDown.
parent
3d570d23
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
0 deletions
+11
-0
lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
+1
-0
lib/python/Testing/ZopeTestCase/zopedoctest/functional.py
lib/python/Testing/ZopeTestCase/zopedoctest/functional.py
+1
-0
lib/python/Testing/ZopeTestCase/zopedoctest/testFunctionalDocTest.py
...Testing/ZopeTestCase/zopedoctest/testFunctionalDocTest.py
+5
-0
lib/python/Testing/ZopeTestCase/zopedoctest/testZopeDocTest.py
...ython/Testing/ZopeTestCase/zopedoctest/testZopeDocTest.py
+4
-0
No files found.
lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
View file @
6c2cadb7
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
publish_module(). Thanks to Andreas Zeidler.
publish_module(). Thanks to Andreas Zeidler.
- Fixed doctestsuite factory to copy layers from test_class to the suite.
- Fixed doctestsuite factory to copy layers from test_class to the suite.
Thanks to Whit Morris.
Thanks to Whit Morris.
- Provide access to test globs in doctest setUp and tearDown.
0.9.8 (Zope 2.8 edition)
0.9.8 (Zope 2.8 edition)
- Renamed 'doctest' package to 'zopedoctest' because of name-shadowing
- Renamed 'doctest' package to 'zopedoctest' because of name-shadowing
...
...
lib/python/Testing/ZopeTestCase/zopedoctest/functional.py
View file @
6c2cadb7
...
@@ -261,6 +261,7 @@ class ZopeSuiteFactory:
...
@@ -261,6 +261,7 @@ class ZopeSuiteFactory:
if hasattr(test_instance, '
portal
'):
if hasattr(test_instance, '
portal
'):
test.globs['
portal
'] = test_instance.portal
test.globs['
portal
'] = test_instance.portal
test.globs['
portal_name
'] = test_instance.portal.getId()
test.globs['
portal_name
'] = test_instance.portal.getId()
test_instance.globs = test.globs
if kwsetUp is not None:
if kwsetUp is not None:
kwsetUp(test_instance)
kwsetUp(test_instance)
...
...
lib/python/Testing/ZopeTestCase/zopedoctest/testFunctionalDocTest.py
View file @
6c2cadb7
...
@@ -38,6 +38,9 @@ def setUp(self):
...
@@ -38,6 +38,9 @@ def setUp(self):
Content-Type: text/plain; charset=...
Content-Type: text/plain; charset=...
<BLANKLINE>
<BLANKLINE>
index
index
>>> foo
1
'''
'''
self
.
folder
.
addDTMLDocument
(
'index_html'
,
file
=
'index'
)
self
.
folder
.
addDTMLDocument
(
'index_html'
,
file
=
'index'
)
...
@@ -55,6 +58,8 @@ def setUp(self):
...
@@ -55,6 +58,8 @@ def setUp(self):
</dtml-in>'''
</dtml-in>'''
self
.
folder
.
addDTMLMethod
(
'show_cookies'
,
file
=
show_cookies
)
self
.
folder
.
addDTMLMethod
(
'show_cookies'
,
file
=
show_cookies
)
self
.
globs
[
'foo'
]
=
1
def
test_suite
():
def
test_suite
():
return
TestSuite
((
return
TestSuite
((
...
...
lib/python/Testing/ZopeTestCase/zopedoctest/testZopeDocTest.py
View file @
6c2cadb7
...
@@ -29,8 +29,12 @@ def setUp(self):
...
@@ -29,8 +29,12 @@ def setUp(self):
>>> 'object' in folder.objectIds()
>>> 'object' in folder.objectIds()
True
True
>>> foo
1
'''
'''
self
.
folder
.
manage_addFolder
(
'object'
,
''
)
self
.
folder
.
manage_addFolder
(
'object'
,
''
)
self
.
globs
[
'foo'
]
=
1
def
test_suite
():
def
test_suite
():
...
...
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