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
12import os .path
3+ import sys
24
35import pkg_resources
46import pytest
1517_sanitizer_testdata = os .path .join (_dir , "sanitizer-testdata" )
1618
1719
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+
1840def pytest_configure (config ):
1941 msgs = []
2042
You can’t perform that action at this time.
0 commit comments