|
1 | 1 | importos.path
|
2 | 2 |
|
| 3 | +importpytest |
| 4 | + |
3 | 5 | from .tree_constructionimportTreeConstructionFile
|
4 | 6 | from .tokenizerimportTokenizerFile
|
5 | 7 | from .sanitizerimportSanitizerFile
|
|
11 | 13 | _sanitizer_testdata=os.path.join(_dir,"sanitizer-testdata")
|
12 | 14 |
|
13 | 15 |
|
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)) |
17 | 29 |
|
18 | 30 |
|
19 | 31 | defpytest_collect_file(path,parent):
|
|