File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 11import os .path
22
3+ import pytest
4+
35from .tree_construction import TreeConstructionFile
46from .tokenizer import TokenizerFile
57from .sanitizer import SanitizerFile
1113_sanitizer_testdata = os .path .join (_dir , "sanitizer-testdata" )
1214
1315
14- def pytest_collectstart ():
15- """check to see if the git submodule has been init'd"""
16- pass
16+ def pytest_configure (config ):
17+ msgs = []
18+ if not os .path .exists (_testdata ):
19+ msg = "testdata not available! "
20+ if os .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+ if msgs :
28+ pytest .exit ("\n " .join (msgs ))
1729
1830
1931def pytest_collect_file (path , parent ):
You can’t perform that action at this time.
0 commit comments