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
4f27bec6
Commit
4f27bec6
authored
Jan 04, 2011
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update some references to the testrunner and removed obsolete docs in ZTC
parent
6f1677b6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
58 deletions
+3
-58
src/Testing/ZopeTestCase/doc/ENVIRONMENT.txt
src/Testing/ZopeTestCase/doc/ENVIRONMENT.txt
+0
-5
src/Testing/ZopeTestCase/doc/README.stx
src/Testing/ZopeTestCase/doc/README.stx
+0
-50
src/Testing/ZopeTestCase/layer.py
src/Testing/ZopeTestCase/layer.py
+1
-1
src/Testing/ZopeTestCase/tests.py
src/Testing/ZopeTestCase/tests.py
+1
-1
src/Testing/ZopeTestCase/zopedoctest/tests.py
src/Testing/ZopeTestCase/zopedoctest/tests.py
+1
-1
No files found.
src/Testing/ZopeTestCase/doc/ENVIRONMENT.txt
View file @
4f27bec6
...
@@ -41,8 +41,3 @@ tests.
...
@@ -41,8 +41,3 @@ tests.
ZEO support ("both") is handled separately, through the new environment
ZEO support ("both") is handled separately, through the new environment
variable ZEO_INSTANCE_HOME.
variable ZEO_INSTANCE_HOME.
You may want to consider using a testrunner to run your tests. You can find one
here: http://zope.org/Members/shh/TestRunner
src/Testing/ZopeTestCase/doc/README.stx
View file @
4f27bec6
...
@@ -13,8 +13,6 @@ ZopeTestCase Readme
...
@@ -13,8 +13,6 @@ ZopeTestCase Readme
2. Create an (empty) '__init__.py' in 'tests' to make it a package.
2. Create an (empty) '__init__.py' in 'tests' to make it a package.
3. Copy 'framework.py' from the 'ZopeTestCase' package into 'tests'.
Once a test suite has been set up, you can add test modules:
Once a test suite has been set up, you can add test modules:
1. Create a file with a name matching 'test*.py'.
1. Create a file with a name matching 'test*.py'.
...
@@ -34,56 +32,8 @@ ZopeTestCase Readme
...
@@ -34,56 +32,8 @@ ZopeTestCase Readme
called after the fixture has been set up and before the fixture is destroyed
called after the fixture has been set up and before the fixture is destroyed
respectively.
respectively.
5. Follow the instructions in 'framework.py' about adding lines to the
top and bottom of the file.
Now you can run the test as 'python path/to/tests/testName.py', or
simply go to the 'tests' directory and type 'python testName.py'.
Note that there is a skeleton test suite named 'testSkeleton.py' that you
Note that there is a skeleton test suite named 'testSkeleton.py' that you
may copy into your 'tests' directory and take it from there.
may copy into your 'tests' directory and take it from there.
Note also that when the tests are run in an INSTANCE_HOME installation of
Zope, you must set the SOFTWARE_HOME environment variable for the 'Testing'
and 'ZopeTestCase' packages to be found.
See the sample tests in the 'ZopeTestCase' directory for details on writing
See the sample tests in the 'ZopeTestCase' directory for details on writing
your own tests.
your own tests.
framework.py
1. Uses SOFTWARE_HOME (if set) to locate the Testing package.
2. Detects and handles INSTANCE_HOME installations of Zope. Please
see ENVIRONMENT.txt for the assumptions ZTC makes about its
environment.
3. Supports setting up a ZODB from a 'custom_zodb.py' file in
the 'tests' directory.
4. Allows to connect to a running ZEO server by setting the
ZEO_INSTANCE_HOME environment variable.
testrunner.py
Alternatively, you may use Zope's testrunner utility to run your tests
('testrunner.py' can be found in the 'utilities' directory of your Zope
installation). If you do so, you will have to define a 'test_suite' method
in your modules (see examples).
There is no need to set SOFTWARE_HOME when using the testrunner but you may
have to provide the -i flag when testing in an INSTANCE_HOME setup.
Example: 'python /path/to/Zope/utilities/testrunner.py -q -i -a'
If your testrunner does not appear to support the -i flag get the one from
'http://zope.org/Members/shh/TestRunner'
Note that the 'custom_zodb.py' magic (3. + 4.) is not available when using
the testrunner.
If you have tests that should not be picked up by the testrunner, make a
'test_suite' method that returns an empty TestSuite.
Note that in Zope 2.7 the testrunner lives in '/path/to/Zope/bin'.
src/Testing/ZopeTestCase/layer.py
View file @
4f27bec6
...
@@ -33,7 +33,7 @@ class ZopeLite:
...
@@ -33,7 +33,7 @@ class ZopeLite:
triggering the testrunner's "resume layer"
triggering the testrunner's "resume layer"
mechanism.
mechanism.
See zope.test
ing.test
runner-layers-ntd.txt
See zope.testrunner-layers-ntd.txt
'''
'''
ZopeLiteLayer
=
ZopeLite
ZopeLiteLayer
=
ZopeLite
...
...
src/Testing/ZopeTestCase/tests.py
View file @
4f27bec6
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
# FOR A PARTICULAR PURPOSE.
# FOR A PARTICULAR PURPOSE.
#
#
##############################################################################
##############################################################################
"""Test runner that works with zope.test
ing.test
runner
"""Test runner that works with zope.testrunner
"""
"""
import
unittest
import
unittest
...
...
src/Testing/ZopeTestCase/zopedoctest/tests.py
View file @
4f27bec6
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
# FOR A PARTICULAR PURPOSE.
# FOR A PARTICULAR PURPOSE.
#
#
##############################################################################
##############################################################################
"""Test runner that works with zope.test
ing.test
runner
"""Test runner that works with zope.testrunner
"""
"""
import
unittest
import
unittest
...
...
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