Show error message when an error occurs on example test
@@ -8,4 +8,11 @@ def run_example(path, *args):
os.path.dirname(__file__), '..', '..', 'examples')
fullpath = os.path.join(examples_path, path)
- return subprocess.check_output((sys.executable, fullpath) + args)
+ try:
+ return subprocess.check_output(
+ (sys.executable, fullpath) + args,
+ stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ print('Original error message:')
+ print(e.output.decode('utf-8'))
+ raise
