diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-02-02 02:15:15 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-02-02 02:15:15 +0000 |
commit | ad6506ff69ea17c11a514b964836409921f7560c (patch) | |
tree | 51cecb3485a3256b693b0113ed634edbf02dc823 /tests/testutils.py | |
parent | 26952ecee421350fd234f9390f03285a966b0d46 (diff) | |
parent | 88a21689cee0e23ea4b2a6e3b423aa0c6c29c36a (diff) | |
download | psycopg2-ad6506ff69ea17c11a514b964836409921f7560c.tar.gz |
Merge branch 'manylinux'
Diffstat (limited to 'tests/testutils.py')
-rw-r--r-- | tests/testutils.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/testutils.py b/tests/testutils.py index 9347735..c36f674 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -447,7 +447,6 @@ def script_to_py3(script): class py3_raises_typeerror(object): - def __enter__(self): pass @@ -455,3 +454,18 @@ class py3_raises_typeerror(object): if sys.version_info[0] >= 3: assert type is TypeError return True + + +def slow(f): + """Decorator to mark slow tests we may want to skip + + Note: in order to find slow tests you can run: + + make check 2>&1 | ts -i "%.s" | sort -n + """ + @wraps(f) + def slow_(self): + if os.environ.get('PSYCOPG2_TEST_FAST'): + return self.skipTest("slow test") + return f(self) + return slow_ |