File: test.py

package info (click to toggle)
alire 1.2.1-2.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 13,124 kB
  • sloc: ada: 77,497; python: 6,605; sh: 477; ansic: 347; makefile: 258; javascript: 87; xml: 40
file content (20 lines) | stat: -rw-r--r-- 564 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""
Verify that creating a Outcome_Failure also dumps the stack trace to log output
"""

from drivers.alr import run_alr
from drivers.asserts import assert_match

import re

p = run_alr('index', '--name', 'xx', '--add', '.',
            complain_on_error=False, debug=True, quiet=True)
# Failed call because name is too short. That causes a Outcome_Failure to be
# returned.

# Since stack traces wildly differ across platforms, a minimal check is done:
assert_match(
    '.*Generating Outcome_Failure with call stack:.*',
    p.out, flags=re.S)

print('SUCCESS')