diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-02-02 01:53:50 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-02-02 01:53:50 +0000 |
commit | f24de0357ff4472aa8bb283980ea27b3ddd722e4 (patch) | |
tree | 70021306cd0905879dcb027034aaf1bf3a4824c2 /tests/test_transaction.py | |
parent | 9ca51e0ed921270b2c641959ffeeb2ca9f58809b (diff) | |
download | psycopg2-manylinux.tar.gz |
Allow skipping the slow testmanylinux
It's not so much about tests being slow: some just get stuck and timeout
travis.
Skipped all tests taking about more than 0.2s to run on my laptop.
Fast testing takes about 8s instead of 24.
Diffstat (limited to 'tests/test_transaction.py')
-rwxr-xr-x | tests/test_transaction.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_transaction.py b/tests/test_transaction.py index 2dc44ec..36947de 100755 --- a/tests/test_transaction.py +++ b/tests/test_transaction.py @@ -23,7 +23,7 @@ # License for more details. import threading -from testutils import unittest, ConnectingTestCase, skip_before_postgres +from testutils import unittest, ConnectingTestCase, skip_before_postgres, slow import psycopg2 from psycopg2.extensions import ( @@ -131,6 +131,7 @@ class DeadlockSerializationTests(ConnectingTestCase): ConnectingTestCase.tearDown(self) + @slow def test_deadlock(self): self.thread1_error = self.thread2_error = None step1 = threading.Event() @@ -178,6 +179,7 @@ class DeadlockSerializationTests(ConnectingTestCase): self.assertTrue(isinstance( error, psycopg2.extensions.TransactionRollbackError)) + @slow def test_serialisation_failure(self): self.thread1_error = self.thread2_error = None step1 = threading.Event() |