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
871264ea
Commit
871264ea
authored
Oct 08, 2001
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added HTML regression test
parent
239e4415
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
lib/python/StructuredText/tests/testStructuredText.py
lib/python/StructuredText/tests/testStructuredText.py
+18
-7
No files found.
lib/python/StructuredText/tests/testStructuredText.py
View file @
871264ea
...
...
@@ -105,6 +105,8 @@ regressions=os.path.join(package_dir, 'regressions')
files
=
[
'index.stx'
,
'Acquisition.stx'
,
'ExtensionClass.stx'
,
'MultiMapping.stx'
,
'examples.stx'
]
reg_files
=
[
'Links.stx'
]
def
readFile
(
dirname
,
fname
):
...
...
@@ -165,12 +167,21 @@ class StructuredTextTests(unittest.TestCase):
'HTML ClassicDocumentClass failed on %s'
%
f
# def testRegressionsTests(self)
# """ there should be a regression tests that compares
# generated HTML against the reference HTML files.
# This test is commented in the 2.4 branch because
# of the change from ST to STXNG and the changed
# HTML generation (HTML references files are no longer
# valid for STXNG)
def
testRegressionsTests
(
self
):
""" HTML regression test """
for
f
in
reg_files
:
Doc
=
DocumentClass
.
DocumentClass
()
HTML
=
HTMLClass
.
HTMLClass
()
raw_text
=
readFile
(
regressions
,
f
)
text
=
Doc
(
ST
.
StructuredText
(
raw_text
))
html
=
HTML
(
text
)
reg_fname
=
f
.
replace
(
'.stx'
,
'.ref'
)
reg_html
=
readFile
(
regressions
,
reg_fname
)
assert
reg_html
.
strip
()
==
html
.
strip
(),
\
'HTML regression test failed on %s'
%
f
framework
()
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