Skip to content

Commit 0e8792b

Browse files
committed
Reintroduce the old sanitizer testsuite from html5lib-tests
This is imported into this repo as its expectations are very much implementation dependent
1 parent f66e100 commit 0e8792b

File tree

3 files changed

+555
-0
lines changed

3 files changed

+555
-0
lines changed

html5lib/tests/conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
from .tree_construction import TreeConstructionFile
44
from .tokenizer import TokenizerFile
5+
from .sanitizer import SanitizerFile
56

67
_dir = os.path.abspath(os.path.dirname(__file__))
78
_testdata = os.path.join(_dir, "testdata")
89
_tree_construction = os.path.join(_testdata, "tree-construction")
910
_tokenizer = os.path.join(_testdata, "tokenizer")
11+
_sanitizer_testdata = os.path.join(_dir, "sanitizer-testdata")
1012

1113

1214
def pytest_collectstart():
@@ -24,3 +26,6 @@ def pytest_collect_file(path, parent):
2426
elif dir == _tokenizer:
2527
if path.ext == ".test":
2628
return TokenizerFile(path, parent)
29+
elif dir == _sanitizer_testdata:
30+
if path.ext == ".dat":
31+
return SanitizerFile(path, parent)

0 commit comments

Comments
 (0)