FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
html5lib-python/tests/test_parser2.py at python3-old · j2project/html5lib-python · GitHub
j2project
/
html5lib-python
Public
forked from
html5lib/html5lib-python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
html5lib-python
/
tests
/
test_parser2.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
28 lines (21 loc) · 778 Bytes
Breadcrumbs
html5lib-python
/
tests
/
test_parser2.py
Copy path
File metadata and controls
executable file
·
28 lines (21 loc) · 778 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import
support
from
html5lib
import
html5parser
from
html5lib
.
treebuilders
import
dom
import
unittest
# tests that aren't autogenerated from text files
class
MoreParserTests
(
unittest
.
TestCase
):
def
test_assertDoctypeCloneable
(
self
):
parser
=
html5parser
.
HTMLParser
(
tree
=
dom
.
TreeBuilder
)
doc
=
parser
.
parse
(
'<!DOCTYPE HTML>'
)
self
.
assert_
(
doc
.
cloneNode
(
True
))
def
test_line_counter
(
self
):
# http://groups.google.com/group/html5lib-discuss/browse_frm/thread/f4f00e4a2f26d5c0
parser
=
html5parser
.
HTMLParser
(
tree
=
dom
.
TreeBuilder
)
parser
.
parse
(
"<pre>
\n
x
\n
>
\n
</pre>"
)
def
buildTestSuite
():
return
unittest
.
defaultTestLoader
.
loadTestsFromName
(
__name__
)
def
main
():
buildTestSuite
()
unittest
.
main
()
if
__name__
==
'__main__'
:
main
()
Back
|
FazBrowse Home
|
New Git URL