File tree 1 file changed +15
-3
lines changed
1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 1
1
import os .path
2
2
3
+ import pytest
4
+
3
5
from .tree_construction import TreeConstructionFile
4
6
from .tokenizer import TokenizerFile
5
7
from .sanitizer import SanitizerFile
11
13
_sanitizer_testdata = os .path .join (_dir , "sanitizer-testdata" )
12
14
13
15
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 ))
17
29
18
30
19
31
def pytest_collect_file (path , parent ):
You can’t perform that action at this time.
0 commit comments