Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit662f2db

Browse files
committed
Fix#122: Check the testdata submodule is present
1 parent7f3e5b3 commit662f2db

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

‎html5lib/tests/conftest.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
importos.path
22

3+
importpytest
4+
35
from .tree_constructionimportTreeConstructionFile
46
from .tokenizerimportTokenizerFile
57
from .sanitizerimportSanitizerFile
@@ -11,9 +13,19 @@
1113
_sanitizer_testdata=os.path.join(_dir,"sanitizer-testdata")
1214

1315

14-
defpytest_collectstart():
15-
"""check to see if the git submodule has been init'd"""
16-
pass
16+
defpytest_configure(config):
17+
msgs= []
18+
ifnotos.path.exists(_testdata):
19+
msg="testdata not available! "
20+
ifos.path.exists(os.path.join(_dir,"..","..",".git")):
21+
msg+= ("Please run git submodule update --init --recursive "+
22+
"and then run tests again.")
23+
else:
24+
msg+= ("The testdata doesn't appear to be included with this package, "+
25+
"so finding the right version will be hard. :(")
26+
msgs.append(msg)
27+
ifmsgs:
28+
pytest.exit("\n".join(msgs))
1729

1830

1931
defpytest_collect_file(path,parent):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp