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
90a56376
Commit
90a56376
authored
Oct 18, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip the tests that require an XML parser if TAL.tests.utils.skipxml is set.
parent
6750ac25
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
lib/python/TAL/runtest.py
lib/python/TAL/runtest.py
+9
-2
lib/python/TAL/tests/run.py
lib/python/TAL/tests/run.py
+3
-2
lib/python/TAL/tests/test_files.py
lib/python/TAL/tests/test_files.py
+5
-2
No files found.
lib/python/TAL/runtest.py
View file @
90a56376
...
...
@@ -98,6 +98,7 @@ if __name__ == "__main__":
import
setpath
# Local hack to tweak sys.path etc.
import
driver
import
tests.utils
def
showdiff
(
a
,
b
):
import
ndiff
...
...
@@ -133,8 +134,11 @@ def main():
del
args
[
0
]
if
not
args
:
prefix
=
os
.
path
.
join
(
"tests"
,
"input"
,
"test*."
)
xmlargs
=
glob
.
glob
(
prefix
+
"xml"
)
xmlargs
.
sort
()
if
tests
.
utils
.
skipxml
:
xmlargs
=
[]
else
:
xmlargs
=
glob
.
glob
(
prefix
+
"xml"
)
xmlargs
.
sort
()
htmlargs
=
glob
.
glob
(
prefix
+
"html"
)
htmlargs
.
sort
()
args
=
xmlargs
+
htmlargs
...
...
@@ -149,6 +153,9 @@ def main():
if
not
unittesting
:
print
arg
,
sys
.
stdout
.
flush
()
if
tests
.
utils
.
skipxml
and
arg
[
-
4
:]
==
".xml"
:
print
"SKIPPED (XML parser not available)"
continue
save
=
sys
.
stdout
,
sys
.
argv
try
:
try
:
...
...
lib/python/TAL/tests/run.py
View file @
90a56376
...
...
@@ -6,7 +6,6 @@ import utils
import
unittest
import
test_htmlparser
import
test_htmltalparser
import
test_xmlparser
import
test_talinterpreter
import
test_files
...
...
@@ -14,7 +13,9 @@ def test_suite():
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
test_htmlparser
.
test_suite
())
suite
.
addTest
(
test_htmltalparser
.
test_suite
())
suite
.
addTest
(
test_xmlparser
.
test_suite
())
if
not
utils
.
skipxml
:
import
test_xmlparser
suite
.
addTest
(
test_xmlparser
.
test_suite
())
suite
.
addTest
(
test_talinterpreter
.
test_suite
())
suite
.
addTest
(
test_files
.
test_suite
())
return
suite
...
...
lib/python/TAL/tests/test_files.py
View file @
90a56376
...
...
@@ -47,8 +47,11 @@ def test_suite():
dir
=
os
.
path
.
abspath
(
dir
)
parentdir
=
os
.
path
.
dirname
(
dir
)
prefix
=
os
.
path
.
join
(
dir
,
"input"
,
"test*."
)
xmlargs
=
glob
.
glob
(
prefix
+
"xml"
)
xmlargs
.
sort
()
if
utils
.
skipxml
:
xmlargs
=
[]
else
:
xmlargs
=
glob
.
glob
(
prefix
+
"xml"
)
xmlargs
.
sort
()
htmlargs
=
glob
.
glob
(
prefix
+
"html"
)
htmlargs
.
sort
()
args
=
xmlargs
+
htmlargs
...
...
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