File: __init__.py

package info (click to toggle)
flask-restful 0.3.10-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,356 kB
  • sloc: python: 3,942; makefile: 277; pascal: 26; sh: 20
file content (17 lines) | stat: -rw-r--r-- 340 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python

import functools

from nose import SkipTest


def expected_failure(test):
    @functools.wraps(test)
    def inner(*args, **kwargs):
        try:
            test(*args, **kwargs)
        except Exception:
            raise SkipTest
        else:
            raise AssertionError('Failure expected')
    return inner