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
bb5fbf58
Commit
bb5fbf58
authored
Jun 12, 2002
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unused test framework module.
parent
36e57a07
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
118 deletions
+9
-118
lib/python/Interface/tests/framework.py
lib/python/Interface/tests/framework.py
+0
-32
lib/python/Products/PageTemplates/tests/framework.py
lib/python/Products/PageTemplates/tests/framework.py
+0
-78
lib/python/Products/PageTemplates/tests/run.py
lib/python/Products/PageTemplates/tests/run.py
+3
-4
lib/python/ZTUtils/tests/run.py
lib/python/ZTUtils/tests/run.py
+6
-4
No files found.
lib/python/Interface/tests/framework.py
deleted
100644 → 0
View file @
36e57a07
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
if
not
sys
.
modules
.
has_key
(
'Testing'
):
p0
=
sys
.
path
[
0
]
if
p0
and
__name__
==
'__main__'
:
os
.
chdir
(
p0
)
p0
=
''
p
=
d
=
os
.
path
.
abspath
(
os
.
curdir
)
while
d
:
if
os
.
path
.
isdir
(
os
.
path
.
join
(
p
,
'Testing'
)):
sys
.
path
[:
1
]
=
[
p0
,
os
.
pardir
,
p
]
break
p
,
d
=
os
.
path
.
split
(
p
)
else
:
print
'Unable to locate Testing package.'
sys
.
exit
(
1
)
import
Testing
,
unittest
execfile
(
os
.
path
.
join
(
os
.
path
.
split
(
Testing
.
__file__
)[
0
],
'common.py'
))
lib/python/Products/PageTemplates/tests/framework.py
deleted
100644 → 0
View file @
36e57a07
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
######################################################################
# Set up unit testing framework
#
# The following code should be at the top of every test module:
#
# import os, sys
# execfile(os.path.join(sys.path[0], 'framework.py'))
#
# ...and the following at the bottom:
#
# if __name__ == '__main__':
# main()
import
string
scriptdir
=
sys
.
path
[
0
]
input_dir
=
os
.
path
.
join
(
scriptdir
,
'input'
)
output_dir
=
os
.
path
.
join
(
scriptdir
,
'output'
)
if
not
sys
.
modules
.
has_key
(
'unittest'
):
if
os
.
path
.
abspath
(
scriptdir
)
==
os
.
path
.
abspath
(
'.'
):
# We're in the tests directory, and need to find unittest.
cwd
=
os
.
getcwd
()
while
1
:
for
ext
in
'py'
,
'pyc'
,
'pyo'
,
'pyd'
:
if
os
.
path
.
isfile
(
os
.
path
.
join
(
cwd
,
'unittest.'
+
ext
)):
break
else
:
cwd
,
lastdir
=
os
.
path
.
split
(
cwd
)
if
lastdir
:
continue
break
sys
.
path
.
insert
(
1
,
cwd
)
else
:
# We must be in the same directory as unittest
sys
.
path
.
insert
(
1
,
''
)
import
unittest
TestRunner
=
unittest
.
TextTestRunner
def
read_input
(
filename
):
filename
=
os
.
path
.
join
(
input_dir
,
filename
)
return
open
(
filename
,
'r'
).
read
()
def
read_output
(
filename
):
filename
=
os
.
path
.
join
(
output_dir
,
filename
)
return
open
(
filename
,
'r'
).
read
()
def
main
():
if
len
(
sys
.
argv
)
>
1
:
errs
=
globals
()[
sys
.
argv
[
1
]]()
else
:
errs
=
TestRunner
().
run
(
test_suite
())
sys
.
exit
(
errs
and
1
or
0
)
def
debug
():
test_suite
().
debug
()
def
pdebug
():
import
pdb
pdb
.
run
(
'debug()'
)
lib/python/Products/PageTemplates/tests/run.py
View file @
bb5fbf58
#!
/usr/bin/env python
#!/usr/bin/env python
"""Run all tests."""
import
os
,
sys
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
import
unittest
def
test_suite
():
suite
=
unittest
.
TestSuite
()
...
...
@@ -12,4 +11,4 @@ def test_suite():
return
suite
if
__name__
==
"__main__"
:
main
(
)
unittest
.
main
(
defaultTest
=
'test_suite'
)
lib/python/ZTUtils/tests/run.py
View file @
bb5fbf58
#!
/usr/bin/env python1.5
#!
/usr/bin/env python
"""Run all tests."""
import
os
,
sys
,
glob
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
import
unittest
import
glob
import
os
import
sys
def
test_suite
():
suite
=
unittest
.
TestSuite
()
...
...
@@ -13,4 +15,4 @@ def test_suite():
return
suite
if
__name__
==
"__main__"
:
main
(
)
unittest
.
main
(
defaultTest
=
'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