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
c68af2e0
Commit
c68af2e0
authored
Aug 27, 2008
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed old framework testrunner and removed references to software home.
parent
034f6906
Changes
35
Show whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
2 additions
and
818 deletions
+2
-818
lib/python/Products/Five/browser/tests/cps_test_localizer.py
lib/python/Products/Five/browser/tests/cps_test_localizer.py
+0
-6
lib/python/Products/Five/browser/tests/framework.py
lib/python/Products/Five/browser/tests/framework.py
+0
-107
lib/python/Products/Five/browser/tests/pts_test_languages.py
lib/python/Products/Five/browser/tests/pts_test_languages.py
+0
-6
lib/python/Products/Five/browser/tests/test_absoluteurl.py
lib/python/Products/Five/browser/tests/test_absoluteurl.py
+0
-6
lib/python/Products/Five/browser/tests/test_adding.py
lib/python/Products/Five/browser/tests/test_adding.py
+0
-6
lib/python/Products/Five/browser/tests/test_decode.py
lib/python/Products/Five/browser/tests/test_decode.py
+0
-6
lib/python/Products/Five/browser/tests/test_defaultview.py
lib/python/Products/Five/browser/tests/test_defaultview.py
+0
-6
lib/python/Products/Five/browser/tests/test_i18n.py
lib/python/Products/Five/browser/tests/test_i18n.py
+0
-6
lib/python/Products/Five/browser/tests/test_menu.py
lib/python/Products/Five/browser/tests/test_menu.py
+0
-6
lib/python/Products/Five/browser/tests/test_pages.py
lib/python/Products/Five/browser/tests/test_pages.py
+0
-6
lib/python/Products/Five/browser/tests/test_provider.py
lib/python/Products/Five/browser/tests/test_provider.py
+0
-6
lib/python/Products/Five/browser/tests/test_recurse.py
lib/python/Products/Five/browser/tests/test_recurse.py
+0
-6
lib/python/Products/Five/browser/tests/test_resource.py
lib/python/Products/Five/browser/tests/test_resource.py
+0
-6
lib/python/Products/Five/browser/tests/test_skin.py
lib/python/Products/Five/browser/tests/test_skin.py
+0
-6
lib/python/Products/Five/browser/tests/test_traversable.py
lib/python/Products/Five/browser/tests/test_traversable.py
+0
-7
lib/python/Products/Five/browser/tests/test_zope3security.py
lib/python/Products/Five/browser/tests/test_zope3security.py
+0
-6
lib/python/Products/Five/form/tests/framework.py
lib/python/Products/Five/form/tests/framework.py
+0
-107
lib/python/Products/Five/form/tests/test_forms.py
lib/python/Products/Five/form/tests/test_forms.py
+0
-6
lib/python/Products/Five/formlib/tests/framework.py
lib/python/Products/Five/formlib/tests/framework.py
+0
-107
lib/python/Products/Five/formlib/tests/test_formlib.py
lib/python/Products/Five/formlib/tests/test_formlib.py
+0
-6
lib/python/Products/Five/skin/tests/framework.py
lib/python/Products/Five/skin/tests/framework.py
+0
-107
lib/python/Products/Five/skin/tests/test_standardmacros.py
lib/python/Products/Five/skin/tests/test_standardmacros.py
+0
-6
lib/python/Products/Five/tests/boilerplate.py
lib/python/Products/Five/tests/boilerplate.py
+0
-6
lib/python/Products/Five/tests/framework.py
lib/python/Products/Five/tests/framework.py
+0
-107
lib/python/Products/Five/tests/test_directives.py
lib/python/Products/Five/tests/test_directives.py
+0
-6
lib/python/Products/Five/tests/test_event.py
lib/python/Products/Five/tests/test_event.py
+0
-7
lib/python/Products/Five/tests/test_i18n.py
lib/python/Products/Five/tests/test_i18n.py
+0
-6
lib/python/Products/Five/tests/test_registerclass.py
lib/python/Products/Five/tests/test_registerclass.py
+0
-6
lib/python/Products/Five/tests/test_registerpackage.py
lib/python/Products/Five/tests/test_registerpackage.py
+1
-6
lib/python/Products/Five/tests/test_security.py
lib/python/Products/Five/tests/test_security.py
+0
-6
lib/python/Products/Five/tests/test_size.py
lib/python/Products/Five/tests/test_size.py
+0
-6
lib/python/Products/Five/utilities/browser/tests/framework.py
...python/Products/Five/utilities/browser/tests/framework.py
+0
-107
lib/python/Products/Five/utilities/browser/tests/test_marker.py
...thon/Products/Five/utilities/browser/tests/test_marker.py
+0
-6
lib/python/Products/Five/zcml.py
lib/python/Products/Five/zcml.py
+1
-10
lib/python/Products/OFSP/help/Control-Panel_Contents.stx
lib/python/Products/OFSP/help/Control-Panel_Contents.stx
+0
-2
No files found.
lib/python/Products/Five/browser/tests/cps_test_localizer.py
View file @
c68af2e0
...
@@ -17,9 +17,6 @@ prefixed with ``cps_`` so it won't be picked up by the test runner.
...
@@ -17,9 +17,6 @@ prefixed with ``cps_`` so it won't be picked up by the test runner.
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
installProduct
,
FunctionalDocFileSuite
from
Testing.ZopeTestCase
import
installProduct
,
FunctionalDocFileSuite
...
@@ -56,6 +53,3 @@ def test_suite():
...
@@ -56,6 +53,3 @@ def test_suite():
return
FunctionalDocFileSuite
(
'cps_test_localizer.txt'
,
return
FunctionalDocFileSuite
(
'cps_test_localizer.txt'
,
package
=
'Products.Five.browser.tests'
)
package
=
'Products.Five.browser.tests'
)
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/browser/tests/framework.py
deleted
100644 → 0
View file @
034f6906
##############################################################################
#
# ZopeTestCase
#
# COPY THIS FILE TO YOUR 'tests' DIRECTORY.
#
# This version of framework.py will use the SOFTWARE_HOME
# environment variable to locate Zope and the Testing package.
#
# If the tests are run in an INSTANCE_HOME installation of Zope,
# Products.__path__ and sys.path with be adjusted to include the
# instance's Products and lib/python directories respectively.
#
# If you explicitly set INSTANCE_HOME prior to running the tests,
# auto-detection is disabled and the specified path will be used
# instead.
#
# If the 'tests' directory contains a custom_zodb.py file, INSTANCE_HOME
# will be adjusted to use it.
#
# If you set the ZEO_INSTANCE_HOME environment variable a ZEO setup
# is assumed, and you can attach to a running ZEO server (via the
# instance's custom_zodb.py).
#
##############################################################################
#
# The following code should be at the top of every test module:
#
# import os, sys
# if __name__ == '__main__':
# execfile(os.path.join(sys.path[0], 'framework.py'))
#
# ...and the following at the bottom:
#
# if __name__ == '__main__':
# framework()
#
##############################################################################
__version__
=
'0.2.3'
# Save start state
#
__SOFTWARE_HOME
=
os
.
environ
.
get
(
'SOFTWARE_HOME'
,
''
)
__INSTANCE_HOME
=
os
.
environ
.
get
(
'INSTANCE_HOME'
,
''
)
if
__SOFTWARE_HOME
.
endswith
(
os
.
sep
):
__SOFTWARE_HOME
=
os
.
path
.
dirname
(
__SOFTWARE_HOME
)
if
__INSTANCE_HOME
.
endswith
(
os
.
sep
):
__INSTANCE_HOME
=
os
.
path
.
dirname
(
__INSTANCE_HOME
)
# Find and import the Testing package
#
if
not
sys
.
modules
.
has_key
(
'Testing'
):
p0
=
sys
.
path
[
0
]
if
p0
and
__name__
==
'__main__'
:
os
.
chdir
(
p0
)
p0
=
''
s
=
__SOFTWARE_HOME
p
=
d
=
s
and
s
or
os
.
getcwd
()
while
d
:
if
os
.
path
.
isdir
(
os
.
path
.
join
(
p
,
'Testing'
)):
zope_home
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
p
))
sys
.
path
[:
1
]
=
[
p0
,
p
,
zope_home
]
break
p
,
d
=
s
and
(
''
,
''
)
or
os
.
path
.
split
(
p
)
else
:
print
'Unable to locate Testing package.'
,
print
'You might need to set SOFTWARE_HOME.'
sys
.
exit
(
1
)
import
Testing
,
unittest
execfile
(
os
.
path
.
join
(
os
.
path
.
dirname
(
Testing
.
__file__
),
'common.py'
))
# Include ZopeTestCase support
#
if
1
:
# Create a new scope
p
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Testing
.
__file__
),
'ZopeTestCase'
)
if
not
os
.
path
.
isdir
(
p
):
print
'Unable to locate ZopeTestCase package.'
,
print
'You might need to install ZopeTestCase.'
sys
.
exit
(
1
)
ztc_common
=
'ztc_common.py'
ztc_common_global
=
os
.
path
.
join
(
p
,
ztc_common
)
f
=
0
if
os
.
path
.
exists
(
ztc_common_global
):
execfile
(
ztc_common_global
)
f
=
1
if
os
.
path
.
exists
(
ztc_common
):
execfile
(
ztc_common
)
f
=
1
if
not
f
:
print
'Unable to locate %s.'
%
ztc_common
sys
.
exit
(
1
)
# Debug
#
print
'SOFTWARE_HOME: %s'
%
os
.
environ
.
get
(
'SOFTWARE_HOME'
,
'Not set'
)
print
'INSTANCE_HOME: %s'
%
os
.
environ
.
get
(
'INSTANCE_HOME'
,
'Not set'
)
sys
.
stdout
.
flush
()
lib/python/Products/Five/browser/tests/pts_test_languages.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
installProduct
,
FunctionalDocFileSuite
from
Testing.ZopeTestCase
import
installProduct
,
FunctionalDocFileSuite
...
@@ -25,6 +22,3 @@ def test_suite():
...
@@ -25,6 +22,3 @@ def test_suite():
installProduct
(
'PlacelessTranslationService'
)
installProduct
(
'PlacelessTranslationService'
)
return
FunctionalDocFileSuite
(
'pts_test_languages.txt'
,
return
FunctionalDocFileSuite
(
'pts_test_languages.txt'
,
package
=
'Products.Five.browser.tests'
)
package
=
'Products.Five.browser.tests'
)
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/browser/tests/test_absoluteurl.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_absoluteurl
():
def
test_absoluteurl
():
"""This tests the absolute url view (IAbsoluteURL or @@absolute_url),
"""This tests the absolute url view (IAbsoluteURL or @@absolute_url),
...
@@ -91,6 +88,3 @@ def test_absoluteurl():
...
@@ -91,6 +88,3 @@ def test_absoluteurl():
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
return
ZopeDocTestSuite
()
return
ZopeDocTestSuite
()
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/browser/tests/test_adding.py
View file @
c68af2e0
...
@@ -15,14 +15,8 @@
...
@@ -15,14 +15,8 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
ZopeDocFileSuite
from
Testing.ZopeTestCase
import
ZopeDocFileSuite
return
ZopeDocFileSuite
(
'adding.txt'
,
return
ZopeDocFileSuite
(
'adding.txt'
,
package
=
"Products.Five.browser.tests"
)
package
=
"Products.Five.browser.tests"
)
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/browser/tests/test_decode.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_processInputs
():
def
test_processInputs
():
"""
"""
...
@@ -54,6 +51,3 @@ def test_processInputs():
...
@@ -54,6 +51,3 @@ def test_processInputs():
def
test_suite
():
def
test_suite
():
from
zope.testing.doctest
import
DocTestSuite
from
zope.testing.doctest
import
DocTestSuite
return
DocTestSuite
()
return
DocTestSuite
()
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/browser/tests/test_defaultview.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_default_view
():
def
test_default_view
():
"""
"""
...
@@ -183,6 +180,3 @@ def test_default_method_args_marshalling():
...
@@ -183,6 +180,3 @@ def test_default_method_args_marshalling():
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
FunctionalDocTestSuite
from
Testing.ZopeTestCase
import
FunctionalDocTestSuite
return
FunctionalDocTestSuite
()
return
FunctionalDocTestSuite
()
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/browser/tests/test_i18n.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_zpt_i18n
():
def
test_zpt_i18n
():
"""
"""
...
@@ -91,6 +88,3 @@ def test_suite():
...
@@ -91,6 +88,3 @@ def test_suite():
from
Testing.ZopeTestCase
import
FunctionalDocTestSuite
from
Testing.ZopeTestCase
import
FunctionalDocTestSuite
from
zope.testing.doctest
import
ELLIPSIS
from
zope.testing.doctest
import
ELLIPSIS
return
FunctionalDocTestSuite
(
optionflags
=
ELLIPSIS
)
return
FunctionalDocTestSuite
(
optionflags
=
ELLIPSIS
)
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/browser/tests/test_menu.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_menu
():
def
test_menu
():
"""
"""
...
@@ -176,6 +173,3 @@ def test_menu():
...
@@ -176,6 +173,3 @@ def test_menu():
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
return
ZopeDocTestSuite
()
return
ZopeDocTestSuite
()
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/browser/tests/test_pages.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_view_with_unwrapped_context
():
def
test_view_with_unwrapped_context
():
"""
"""
...
@@ -82,6 +79,3 @@ def test_suite():
...
@@ -82,6 +79,3 @@ def test_suite():
package
=
'Products.Five.browser.tests'
),
package
=
'Products.Five.browser.tests'
),
))
))
return
suite
return
suite
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/browser/tests/test_provider.py
View file @
c68af2e0
...
@@ -15,14 +15,8 @@
...
@@ -15,14 +15,8 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
FunctionalDocFileSuite
from
Testing.ZopeTestCase
import
FunctionalDocFileSuite
return
FunctionalDocFileSuite
(
'provider.txt'
,
return
FunctionalDocFileSuite
(
'provider.txt'
,
package
=
'Products.Five.browser.tests'
)
package
=
'Products.Five.browser.tests'
)
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/browser/tests/test_recurse.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_recursion
():
def
test_recursion
():
"""
"""
...
@@ -67,6 +64,3 @@ def test_recursion():
...
@@ -67,6 +64,3 @@ def test_recursion():
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
return
ZopeDocTestSuite
()
return
ZopeDocTestSuite
()
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/browser/tests/test_resource.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_suite
():
def
test_suite
():
import
unittest
import
unittest
...
@@ -30,6 +27,3 @@ def test_suite():
...
@@ -30,6 +27,3 @@ def test_suite():
FunctionalDocFileSuite
(
'resource_ftest.txt'
,
FunctionalDocFileSuite
(
'resource_ftest.txt'
,
package
=
'Products.Five.browser.tests'
),
package
=
'Products.Five.browser.tests'
),
))
))
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/browser/tests/test_skin.py
View file @
c68af2e0
...
@@ -15,14 +15,8 @@
...
@@ -15,14 +15,8 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
FunctionalDocFileSuite
from
Testing.ZopeTestCase
import
FunctionalDocFileSuite
return
FunctionalDocFileSuite
(
'skin.txt'
,
return
FunctionalDocFileSuite
(
'skin.txt'
,
package
=
'Products.Five.browser.tests'
)
package
=
'Products.Five.browser.tests'
)
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/browser/tests/test_traversable.py
View file @
c68af2e0
...
@@ -15,10 +15,6 @@
...
@@ -15,10 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
class
SimpleClass
(
object
):
class
SimpleClass
(
object
):
"""Class with no __bobo_traverse__."""
"""Class with no __bobo_traverse__."""
...
@@ -289,6 +285,3 @@ def test_view_doesnt_shadow_attribute():
...
@@ -289,6 +285,3 @@ def test_view_doesnt_shadow_attribute():
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
FunctionalDocTestSuite
from
Testing.ZopeTestCase
import
FunctionalDocTestSuite
return
FunctionalDocTestSuite
()
return
FunctionalDocTestSuite
()
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/browser/tests/test_zope3security.py
View file @
c68af2e0
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_check_permission
():
def
test_check_permission
():
"""Code (in Zope 3) often uses
"""Code (in Zope 3) often uses
...
@@ -60,6 +57,3 @@ def test_suite():
...
@@ -60,6 +57,3 @@ def test_suite():
from
Testing.ZopeTestCase
import
FunctionalDocTestSuite
from
Testing.ZopeTestCase
import
FunctionalDocTestSuite
from
zope.testing.doctest
import
ELLIPSIS
from
zope.testing.doctest
import
ELLIPSIS
return
FunctionalDocTestSuite
(
optionflags
=
ELLIPSIS
)
return
FunctionalDocTestSuite
(
optionflags
=
ELLIPSIS
)
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/form/tests/framework.py
deleted
100644 → 0
View file @
034f6906
##############################################################################
#
# ZopeTestCase
#
# COPY THIS FILE TO YOUR 'tests' DIRECTORY.
#
# This version of framework.py will use the SOFTWARE_HOME
# environment variable to locate Zope and the Testing package.
#
# If the tests are run in an INSTANCE_HOME installation of Zope,
# Products.__path__ and sys.path with be adjusted to include the
# instance's Products and lib/python directories respectively.
#
# If you explicitly set INSTANCE_HOME prior to running the tests,
# auto-detection is disabled and the specified path will be used
# instead.
#
# If the 'tests' directory contains a custom_zodb.py file, INSTANCE_HOME
# will be adjusted to use it.
#
# If you set the ZEO_INSTANCE_HOME environment variable a ZEO setup
# is assumed, and you can attach to a running ZEO server (via the
# instance's custom_zodb.py).
#
##############################################################################
#
# The following code should be at the top of every test module:
#
# import os, sys
# if __name__ == '__main__':
# execfile(os.path.join(sys.path[0], 'framework.py'))
#
# ...and the following at the bottom:
#
# if __name__ == '__main__':
# framework()
#
##############################################################################
__version__
=
'0.2.3'
# Save start state
#
__SOFTWARE_HOME
=
os
.
environ
.
get
(
'SOFTWARE_HOME'
,
''
)
__INSTANCE_HOME
=
os
.
environ
.
get
(
'INSTANCE_HOME'
,
''
)
if
__SOFTWARE_HOME
.
endswith
(
os
.
sep
):
__SOFTWARE_HOME
=
os
.
path
.
dirname
(
__SOFTWARE_HOME
)
if
__INSTANCE_HOME
.
endswith
(
os
.
sep
):
__INSTANCE_HOME
=
os
.
path
.
dirname
(
__INSTANCE_HOME
)
# Find and import the Testing package
#
if
not
sys
.
modules
.
has_key
(
'Testing'
):
p0
=
sys
.
path
[
0
]
if
p0
and
__name__
==
'__main__'
:
os
.
chdir
(
p0
)
p0
=
''
s
=
__SOFTWARE_HOME
p
=
d
=
s
and
s
or
os
.
getcwd
()
while
d
:
if
os
.
path
.
isdir
(
os
.
path
.
join
(
p
,
'Testing'
)):
zope_home
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
p
))
sys
.
path
[:
1
]
=
[
p0
,
p
,
zope_home
]
break
p
,
d
=
s
and
(
''
,
''
)
or
os
.
path
.
split
(
p
)
else
:
print
'Unable to locate Testing package.'
,
print
'You might need to set SOFTWARE_HOME.'
sys
.
exit
(
1
)
import
Testing
,
unittest
execfile
(
os
.
path
.
join
(
os
.
path
.
dirname
(
Testing
.
__file__
),
'common.py'
))
# Include ZopeTestCase support
#
if
1
:
# Create a new scope
p
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Testing
.
__file__
),
'ZopeTestCase'
)
if
not
os
.
path
.
isdir
(
p
):
print
'Unable to locate ZopeTestCase package.'
,
print
'You might need to install ZopeTestCase.'
sys
.
exit
(
1
)
ztc_common
=
'ztc_common.py'
ztc_common_global
=
os
.
path
.
join
(
p
,
ztc_common
)
f
=
0
if
os
.
path
.
exists
(
ztc_common_global
):
execfile
(
ztc_common_global
)
f
=
1
if
os
.
path
.
exists
(
ztc_common
):
execfile
(
ztc_common
)
f
=
1
if
not
f
:
print
'Unable to locate %s.'
%
ztc_common
sys
.
exit
(
1
)
# Debug
#
print
'SOFTWARE_HOME: %s'
%
os
.
environ
.
get
(
'SOFTWARE_HOME'
,
'Not set'
)
print
'INSTANCE_HOME: %s'
%
os
.
environ
.
get
(
'INSTANCE_HOME'
,
'Not set'
)
sys
.
stdout
.
flush
()
lib/python/Products/Five/form/tests/test_forms.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_get_widgets_for_schema_fields
():
def
test_get_widgets_for_schema_fields
():
"""
"""
...
@@ -69,6 +66,3 @@ def test_suite():
...
@@ -69,6 +66,3 @@ def test_suite():
FunctionalDocFileSuite
(
'forms.txt'
,
FunctionalDocFileSuite
(
'forms.txt'
,
package
=
"Products.Five.form.tests"
,),
package
=
"Products.Five.form.tests"
,),
))
))
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/formlib/tests/framework.py
deleted
100644 → 0
View file @
034f6906
##############################################################################
#
# ZopeTestCase
#
# COPY THIS FILE TO YOUR 'tests' DIRECTORY.
#
# This version of framework.py will use the SOFTWARE_HOME
# environment variable to locate Zope and the Testing package.
#
# If the tests are run in an INSTANCE_HOME installation of Zope,
# Products.__path__ and sys.path with be adjusted to include the
# instance's Products and lib/python directories respectively.
#
# If you explicitly set INSTANCE_HOME prior to running the tests,
# auto-detection is disabled and the specified path will be used
# instead.
#
# If the 'tests' directory contains a custom_zodb.py file, INSTANCE_HOME
# will be adjusted to use it.
#
# If you set the ZEO_INSTANCE_HOME environment variable a ZEO setup
# is assumed, and you can attach to a running ZEO server (via the
# instance's custom_zodb.py).
#
##############################################################################
#
# The following code should be at the top of every test module:
#
# import os, sys
# if __name__ == '__main__':
# execfile(os.path.join(sys.path[0], 'framework.py'))
#
# ...and the following at the bottom:
#
# if __name__ == '__main__':
# framework()
#
##############################################################################
__version__
=
'0.2.3'
# Save start state
#
__SOFTWARE_HOME
=
os
.
environ
.
get
(
'SOFTWARE_HOME'
,
''
)
__INSTANCE_HOME
=
os
.
environ
.
get
(
'INSTANCE_HOME'
,
''
)
if
__SOFTWARE_HOME
.
endswith
(
os
.
sep
):
__SOFTWARE_HOME
=
os
.
path
.
dirname
(
__SOFTWARE_HOME
)
if
__INSTANCE_HOME
.
endswith
(
os
.
sep
):
__INSTANCE_HOME
=
os
.
path
.
dirname
(
__INSTANCE_HOME
)
# Find and import the Testing package
#
if
not
sys
.
modules
.
has_key
(
'Testing'
):
p0
=
sys
.
path
[
0
]
if
p0
and
__name__
==
'__main__'
:
os
.
chdir
(
p0
)
p0
=
''
s
=
__SOFTWARE_HOME
p
=
d
=
s
and
s
or
os
.
getcwd
()
while
d
:
if
os
.
path
.
isdir
(
os
.
path
.
join
(
p
,
'Testing'
)):
zope_home
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
p
))
sys
.
path
[:
1
]
=
[
p0
,
p
,
zope_home
]
break
p
,
d
=
s
and
(
''
,
''
)
or
os
.
path
.
split
(
p
)
else
:
print
'Unable to locate Testing package.'
,
print
'You might need to set SOFTWARE_HOME.'
sys
.
exit
(
1
)
import
Testing
,
unittest
execfile
(
os
.
path
.
join
(
os
.
path
.
dirname
(
Testing
.
__file__
),
'common.py'
))
# Include ZopeTestCase support
#
if
1
:
# Create a new scope
p
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Testing
.
__file__
),
'ZopeTestCase'
)
if
not
os
.
path
.
isdir
(
p
):
print
'Unable to locate ZopeTestCase package.'
,
print
'You might need to install ZopeTestCase.'
sys
.
exit
(
1
)
ztc_common
=
'ztc_common.py'
ztc_common_global
=
os
.
path
.
join
(
p
,
ztc_common
)
f
=
0
if
os
.
path
.
exists
(
ztc_common_global
):
execfile
(
ztc_common_global
)
f
=
1
if
os
.
path
.
exists
(
ztc_common
):
execfile
(
ztc_common
)
f
=
1
if
not
f
:
print
'Unable to locate %s.'
%
ztc_common
sys
.
exit
(
1
)
# Debug
#
print
'SOFTWARE_HOME: %s'
%
os
.
environ
.
get
(
'SOFTWARE_HOME'
,
'Not set'
)
print
'INSTANCE_HOME: %s'
%
os
.
environ
.
get
(
'INSTANCE_HOME'
,
'Not set'
)
sys
.
stdout
.
flush
()
lib/python/Products/Five/formlib/tests/test_formlib.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_suite
():
def
test_suite
():
import
unittest
import
unittest
...
@@ -26,6 +23,3 @@ def test_suite():
...
@@ -26,6 +23,3 @@ def test_suite():
FunctionalDocFileSuite
(
FunctionalDocFileSuite
(
'formlib.txt'
,
package
=
'Products.Five.formlib.tests'
),
'formlib.txt'
,
package
=
'Products.Five.formlib.tests'
),
))
))
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/skin/tests/framework.py
deleted
100644 → 0
View file @
034f6906
##############################################################################
#
# ZopeTestCase
#
# COPY THIS FILE TO YOUR 'tests' DIRECTORY.
#
# This version of framework.py will use the SOFTWARE_HOME
# environment variable to locate Zope and the Testing package.
#
# If the tests are run in an INSTANCE_HOME installation of Zope,
# Products.__path__ and sys.path with be adjusted to include the
# instance's Products and lib/python directories respectively.
#
# If you explicitly set INSTANCE_HOME prior to running the tests,
# auto-detection is disabled and the specified path will be used
# instead.
#
# If the 'tests' directory contains a custom_zodb.py file, INSTANCE_HOME
# will be adjusted to use it.
#
# If you set the ZEO_INSTANCE_HOME environment variable a ZEO setup
# is assumed, and you can attach to a running ZEO server (via the
# instance's custom_zodb.py).
#
##############################################################################
#
# The following code should be at the top of every test module:
#
# import os, sys
# if __name__ == '__main__':
# execfile(os.path.join(sys.path[0], 'framework.py'))
#
# ...and the following at the bottom:
#
# if __name__ == '__main__':
# framework()
#
##############################################################################
__version__
=
'0.2.3'
# Save start state
#
__SOFTWARE_HOME
=
os
.
environ
.
get
(
'SOFTWARE_HOME'
,
''
)
__INSTANCE_HOME
=
os
.
environ
.
get
(
'INSTANCE_HOME'
,
''
)
if
__SOFTWARE_HOME
.
endswith
(
os
.
sep
):
__SOFTWARE_HOME
=
os
.
path
.
dirname
(
__SOFTWARE_HOME
)
if
__INSTANCE_HOME
.
endswith
(
os
.
sep
):
__INSTANCE_HOME
=
os
.
path
.
dirname
(
__INSTANCE_HOME
)
# Find and import the Testing package
#
if
not
sys
.
modules
.
has_key
(
'Testing'
):
p0
=
sys
.
path
[
0
]
if
p0
and
__name__
==
'__main__'
:
os
.
chdir
(
p0
)
p0
=
''
s
=
__SOFTWARE_HOME
p
=
d
=
s
and
s
or
os
.
getcwd
()
while
d
:
if
os
.
path
.
isdir
(
os
.
path
.
join
(
p
,
'Testing'
)):
zope_home
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
p
))
sys
.
path
[:
1
]
=
[
p0
,
p
,
zope_home
]
break
p
,
d
=
s
and
(
''
,
''
)
or
os
.
path
.
split
(
p
)
else
:
print
'Unable to locate Testing package.'
,
print
'You might need to set SOFTWARE_HOME.'
sys
.
exit
(
1
)
import
Testing
,
unittest
execfile
(
os
.
path
.
join
(
os
.
path
.
dirname
(
Testing
.
__file__
),
'common.py'
))
# Include ZopeTestCase support
#
if
1
:
# Create a new scope
p
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Testing
.
__file__
),
'ZopeTestCase'
)
if
not
os
.
path
.
isdir
(
p
):
print
'Unable to locate ZopeTestCase package.'
,
print
'You might need to install ZopeTestCase.'
sys
.
exit
(
1
)
ztc_common
=
'ztc_common.py'
ztc_common_global
=
os
.
path
.
join
(
p
,
ztc_common
)
f
=
0
if
os
.
path
.
exists
(
ztc_common_global
):
execfile
(
ztc_common_global
)
f
=
1
if
os
.
path
.
exists
(
ztc_common
):
execfile
(
ztc_common
)
f
=
1
if
not
f
:
print
'Unable to locate %s.'
%
ztc_common
sys
.
exit
(
1
)
# Debug
#
print
'SOFTWARE_HOME: %s'
%
os
.
environ
.
get
(
'SOFTWARE_HOME'
,
'Not set'
)
print
'INSTANCE_HOME: %s'
%
os
.
environ
.
get
(
'INSTANCE_HOME'
,
'Not set'
)
sys
.
stdout
.
flush
()
lib/python/Products/Five/skin/tests/test_standardmacros.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_standard_macros
():
def
test_standard_macros
():
"""Test standard macros
"""Test standard macros
...
@@ -79,6 +76,3 @@ def test_standard_macros():
...
@@ -79,6 +76,3 @@ def test_standard_macros():
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
return
ZopeDocTestSuite
()
return
ZopeDocTestSuite
()
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/tests/boilerplate.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_boilerplate
():
def
test_boilerplate
():
"""
"""
...
@@ -38,6 +35,3 @@ def test_boilerplate():
...
@@ -38,6 +35,3 @@ def test_boilerplate():
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
return
ZopeDocTestSuite
()
return
ZopeDocTestSuite
()
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/tests/framework.py
deleted
100644 → 0
View file @
034f6906
##############################################################################
#
# ZopeTestCase
#
# COPY THIS FILE TO YOUR 'tests' DIRECTORY.
#
# This version of framework.py will use the SOFTWARE_HOME
# environment variable to locate Zope and the Testing package.
#
# If the tests are run in an INSTANCE_HOME installation of Zope,
# Products.__path__ and sys.path with be adjusted to include the
# instance's Products and lib/python directories respectively.
#
# If you explicitly set INSTANCE_HOME prior to running the tests,
# auto-detection is disabled and the specified path will be used
# instead.
#
# If the 'tests' directory contains a custom_zodb.py file, INSTANCE_HOME
# will be adjusted to use it.
#
# If you set the ZEO_INSTANCE_HOME environment variable a ZEO setup
# is assumed, and you can attach to a running ZEO server (via the
# instance's custom_zodb.py).
#
##############################################################################
#
# The following code should be at the top of every test module:
#
# import os, sys
# if __name__ == '__main__':
# execfile(os.path.join(sys.path[0], 'framework.py'))
#
# ...and the following at the bottom:
#
# if __name__ == '__main__':
# framework()
#
##############################################################################
__version__
=
'0.2.3'
# Save start state
#
__SOFTWARE_HOME
=
os
.
environ
.
get
(
'SOFTWARE_HOME'
,
''
)
__INSTANCE_HOME
=
os
.
environ
.
get
(
'INSTANCE_HOME'
,
''
)
if
__SOFTWARE_HOME
.
endswith
(
os
.
sep
):
__SOFTWARE_HOME
=
os
.
path
.
dirname
(
__SOFTWARE_HOME
)
if
__INSTANCE_HOME
.
endswith
(
os
.
sep
):
__INSTANCE_HOME
=
os
.
path
.
dirname
(
__INSTANCE_HOME
)
# Find and import the Testing package
#
if
not
sys
.
modules
.
has_key
(
'Testing'
):
p0
=
sys
.
path
[
0
]
if
p0
and
__name__
==
'__main__'
:
os
.
chdir
(
p0
)
p0
=
''
s
=
__SOFTWARE_HOME
p
=
d
=
s
and
s
or
os
.
getcwd
()
while
d
:
if
os
.
path
.
isdir
(
os
.
path
.
join
(
p
,
'Testing'
)):
zope_home
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
p
))
sys
.
path
[:
1
]
=
[
p0
,
p
,
zope_home
]
break
p
,
d
=
s
and
(
''
,
''
)
or
os
.
path
.
split
(
p
)
else
:
print
'Unable to locate Testing package.'
,
print
'You might need to set SOFTWARE_HOME.'
sys
.
exit
(
1
)
import
Testing
,
unittest
execfile
(
os
.
path
.
join
(
os
.
path
.
dirname
(
Testing
.
__file__
),
'common.py'
))
# Include ZopeTestCase support
#
if
1
:
# Create a new scope
p
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Testing
.
__file__
),
'ZopeTestCase'
)
if
not
os
.
path
.
isdir
(
p
):
print
'Unable to locate ZopeTestCase package.'
,
print
'You might need to install ZopeTestCase.'
sys
.
exit
(
1
)
ztc_common
=
'ztc_common.py'
ztc_common_global
=
os
.
path
.
join
(
p
,
ztc_common
)
f
=
0
if
os
.
path
.
exists
(
ztc_common_global
):
execfile
(
ztc_common_global
)
f
=
1
if
os
.
path
.
exists
(
ztc_common
):
execfile
(
ztc_common
)
f
=
1
if
not
f
:
print
'Unable to locate %s.'
%
ztc_common
sys
.
exit
(
1
)
# Debug
#
print
'SOFTWARE_HOME: %s'
%
os
.
environ
.
get
(
'SOFTWARE_HOME'
,
'Not set'
)
print
'INSTANCE_HOME: %s'
%
os
.
environ
.
get
(
'INSTANCE_HOME'
,
'Not set'
)
sys
.
stdout
.
flush
()
lib/python/Products/Five/tests/test_directives.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_directives
():
def
test_directives
():
"""
"""
...
@@ -77,6 +74,3 @@ def test_directives():
...
@@ -77,6 +74,3 @@ def test_directives():
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
return
ZopeDocTestSuite
()
return
ZopeDocTestSuite
()
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/tests/test_event.py
View file @
c68af2e0
...
@@ -15,10 +15,6 @@
...
@@ -15,10 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
# These classes aren't defined in the doctest because otherwise
# These classes aren't defined in the doctest because otherwise
# they wouldn't be picklable, and we need that to test copy/paste.
# they wouldn't be picklable, and we need that to test copy/paste.
...
@@ -90,6 +86,3 @@ def test_suite():
...
@@ -90,6 +86,3 @@ def test_suite():
from
zope.testing.doctest
import
DocFileSuite
from
zope.testing.doctest
import
DocFileSuite
return
DocFileSuite
(
'event.txt'
,
package
=
"Products.Five.tests"
,
return
DocFileSuite
(
'event.txt'
,
package
=
"Products.Five.tests"
,
setUp
=
setUp
,
tearDown
=
testing
.
tearDown
)
setUp
=
setUp
,
tearDown
=
testing
.
tearDown
)
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/tests/test_i18n.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
from
zope.component.testing
import
setUp
,
tearDown
from
zope.component.testing
import
setUp
,
tearDown
...
@@ -91,6 +88,3 @@ def test_FiveTranslationService():
...
@@ -91,6 +88,3 @@ def test_FiveTranslationService():
def
test_suite
():
def
test_suite
():
from
zope.testing.doctest
import
DocTestSuite
from
zope.testing.doctest
import
DocTestSuite
return
DocTestSuite
(
setUp
=
setUp
,
tearDown
=
tearDown
)
return
DocTestSuite
(
setUp
=
setUp
,
tearDown
=
tearDown
)
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/tests/test_registerclass.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_registerClass
():
def
test_registerClass
():
"""
"""
...
@@ -146,6 +143,3 @@ def test_registerClass():
...
@@ -146,6 +143,3 @@ def test_registerClass():
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
return
ZopeDocTestSuite
()
return
ZopeDocTestSuite
()
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/tests/test_registerpackage.py
View file @
c68af2e0
...
@@ -15,9 +15,7 @@
...
@@ -15,9 +15,7 @@
$Id$
$Id$
"""
"""
import
os
,
sys
import
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
# need to add the testing package to the pythonpath in order to
# need to add the testing package to the pythonpath in order to
# test python-packages-as-products
# test python-packages-as-products
...
@@ -86,6 +84,3 @@ def test_suite():
...
@@ -86,6 +84,3 @@ def test_suite():
# Must use functional because registerPackage commits
# Must use functional because registerPackage commits
from
Testing.ZopeTestCase
import
FunctionalDocTestSuite
from
Testing.ZopeTestCase
import
FunctionalDocTestSuite
return
FunctionalDocTestSuite
()
return
FunctionalDocTestSuite
()
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/tests/test_security.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
from
zope.interface
import
Interface
,
implements
from
zope.interface
import
Interface
,
implements
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
...
@@ -318,6 +315,3 @@ def test_checkPermission():
...
@@ -318,6 +315,3 @@ def test_checkPermission():
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
return
ZopeDocTestSuite
()
return
ZopeDocTestSuite
()
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/tests/test_size.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
from
zope.interface
import
implements
from
zope.interface
import
implements
from
zope.size.interfaces
import
ISized
from
zope.size.interfaces
import
ISized
...
@@ -102,6 +99,3 @@ def test_size():
...
@@ -102,6 +99,3 @@ def test_size():
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
return
ZopeDocTestSuite
()
return
ZopeDocTestSuite
()
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/utilities/browser/tests/framework.py
deleted
100644 → 0
View file @
034f6906
##############################################################################
#
# ZopeTestCase
#
# COPY THIS FILE TO YOUR 'tests' DIRECTORY.
#
# This version of framework.py will use the SOFTWARE_HOME
# environment variable to locate Zope and the Testing package.
#
# If the tests are run in an INSTANCE_HOME installation of Zope,
# Products.__path__ and sys.path with be adjusted to include the
# instance's Products and lib/python directories respectively.
#
# If you explicitly set INSTANCE_HOME prior to running the tests,
# auto-detection is disabled and the specified path will be used
# instead.
#
# If the 'tests' directory contains a custom_zodb.py file, INSTANCE_HOME
# will be adjusted to use it.
#
# If you set the ZEO_INSTANCE_HOME environment variable a ZEO setup
# is assumed, and you can attach to a running ZEO server (via the
# instance's custom_zodb.py).
#
##############################################################################
#
# The following code should be at the top of every test module:
#
# import os, sys
# if __name__ == '__main__':
# execfile(os.path.join(sys.path[0], 'framework.py'))
#
# ...and the following at the bottom:
#
# if __name__ == '__main__':
# framework()
#
##############################################################################
__version__
=
'0.2.3'
# Save start state
#
__SOFTWARE_HOME
=
os
.
environ
.
get
(
'SOFTWARE_HOME'
,
''
)
__INSTANCE_HOME
=
os
.
environ
.
get
(
'INSTANCE_HOME'
,
''
)
if
__SOFTWARE_HOME
.
endswith
(
os
.
sep
):
__SOFTWARE_HOME
=
os
.
path
.
dirname
(
__SOFTWARE_HOME
)
if
__INSTANCE_HOME
.
endswith
(
os
.
sep
):
__INSTANCE_HOME
=
os
.
path
.
dirname
(
__INSTANCE_HOME
)
# Find and import the Testing package
#
if
not
sys
.
modules
.
has_key
(
'Testing'
):
p0
=
sys
.
path
[
0
]
if
p0
and
__name__
==
'__main__'
:
os
.
chdir
(
p0
)
p0
=
''
s
=
__SOFTWARE_HOME
p
=
d
=
s
and
s
or
os
.
getcwd
()
while
d
:
if
os
.
path
.
isdir
(
os
.
path
.
join
(
p
,
'Testing'
)):
zope_home
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
p
))
sys
.
path
[:
1
]
=
[
p0
,
p
,
zope_home
]
break
p
,
d
=
s
and
(
''
,
''
)
or
os
.
path
.
split
(
p
)
else
:
print
'Unable to locate Testing package.'
,
print
'You might need to set SOFTWARE_HOME.'
sys
.
exit
(
1
)
import
Testing
,
unittest
execfile
(
os
.
path
.
join
(
os
.
path
.
dirname
(
Testing
.
__file__
),
'common.py'
))
# Include ZopeTestCase support
#
if
1
:
# Create a new scope
p
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Testing
.
__file__
),
'ZopeTestCase'
)
if
not
os
.
path
.
isdir
(
p
):
print
'Unable to locate ZopeTestCase package.'
,
print
'You might need to install ZopeTestCase.'
sys
.
exit
(
1
)
ztc_common
=
'ztc_common.py'
ztc_common_global
=
os
.
path
.
join
(
p
,
ztc_common
)
f
=
0
if
os
.
path
.
exists
(
ztc_common_global
):
execfile
(
ztc_common_global
)
f
=
1
if
os
.
path
.
exists
(
ztc_common
):
execfile
(
ztc_common
)
f
=
1
if
not
f
:
print
'Unable to locate %s.'
%
ztc_common
sys
.
exit
(
1
)
# Debug
#
print
'SOFTWARE_HOME: %s'
%
os
.
environ
.
get
(
'SOFTWARE_HOME'
,
'Not set'
)
print
'INSTANCE_HOME: %s'
%
os
.
environ
.
get
(
'INSTANCE_HOME'
,
'Not set'
)
sys
.
stdout
.
flush
()
lib/python/Products/Five/utilities/browser/tests/test_marker.py
View file @
c68af2e0
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
$Id$
$Id$
"""
"""
import
os
,
sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_editview
():
def
test_editview
():
"""
"""
...
@@ -91,6 +88,3 @@ def test_editview():
...
@@ -91,6 +88,3 @@ def test_editview():
def
test_suite
():
def
test_suite
():
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
return
ZopeDocTestSuite
()
return
ZopeDocTestSuite
()
if
__name__
==
'__main__'
:
framework
()
lib/python/Products/Five/zcml.py
View file @
c68af2e0
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
$Id$
$Id$
"""
"""
import
warnings
import
os
import
os
from
zope.configuration
import
xmlconfig
from
zope.configuration
import
xmlconfig
...
@@ -34,20 +33,12 @@ def load_site():
...
@@ -34,20 +33,12 @@ def load_site():
# load instance site configuration file
# load instance site configuration file
site_zcml
=
os
.
path
.
join
(
INSTANCE_HOME
,
"etc"
,
"site.zcml"
)
site_zcml
=
os
.
path
.
join
(
INSTANCE_HOME
,
"etc"
,
"site.zcml"
)
skel_site_zcml
=
os
.
path
.
join
(
INSTANCE_HOME
,
"skel"
,
"etc"
,
"site.zcml"
)
skel_site_zcml
=
os
.
path
.
join
(
INSTANCE_HOME
,
"skel"
,
"etc"
,
"site.zcml"
)
skel_site2_zcml
=
os
.
path
.
join
(
ZOPE_HOME
,
"skel"
,
"etc"
,
"site.zcml"
)
if
os
.
path
.
exists
(
site_zcml
):
if
os
.
path
.
exists
(
site_zcml
):
file
=
site_zcml
file
=
site_zcml
el
if
os
.
path
.
exists
(
skel_site_zcml
)
:
el
se
:
# check for zope installation home skel during running unit tests
# check for zope installation home skel during running unit tests
file
=
skel_site_zcml
file
=
skel_site_zcml
else
:
file
=
skel_site2_zcml
msg
=
"site.zcml should now live at '%s', for "
\
"sites upgraded from Zope 2.9 please copy '%s' "
\
"to '%s'"
\
%
(
site_zcml
,
skel_site2_zcml
,
site_zcml
)
warnings
.
warn
(
msg
,
DeprecationWarning
)
global
_context
global
_context
_context
=
xmlconfig
.
file
(
file
)
_context
=
xmlconfig
.
file
(
file
)
...
...
lib/python/Products/OFSP/help/Control-Panel_Contents.stx
View file @
c68af2e0
...
@@ -15,8 +15,6 @@ Control Panel - Contents: Zope system controls
...
@@ -15,8 +15,6 @@ Control Panel - Contents: Zope system controls
'System Platform' -- The type of machine Zope is running on.
'System Platform' -- The type of machine Zope is running on.
'SOFTWARE_HOME' -- The filesystem path of the core Zope software.
'INSTANCE_HOME' -- The filesystem path where Zope loads add-on
'INSTANCE_HOME' -- The filesystem path where Zope loads add-on
software.
software.
...
...
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