File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ from __future__ import print_function
1
2
import os .path
3
+ import sys
2
4
3
5
import pkg_resources
4
6
import pytest
15
17
_sanitizer_testdata = os .path .join (_dir , "sanitizer-testdata" )
16
18
17
19
20
+ def fail_if_missing_pytest_expect ():
21
+ """Throws an exception halting pytest if pytest-expect isn't working"""
22
+ try :
23
+ from pytest_expect import expect # noqa
24
+ except ImportError :
25
+ header = '*' * 78
26
+ print (
27
+ '\n ' +
28
+ header + '\n ' +
29
+ 'ERROR: Either pytest-expect or its dependency u-msgpack-python is not\n ' +
30
+ 'installed. Please install them both before running pytest.\n ' +
31
+ header + '\n ' ,
32
+ file = sys .stderr
33
+ )
34
+ raise
35
+
36
+
37
+ fail_if_missing_pytest_expect ()
38
+
39
+
18
40
def pytest_configure (config ):
19
41
msgs = []
20
42
You can’t perform that action at this time.
0 commit comments