]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
mark the tests that seem to be segfauling py3k+coverage so that we can exclude them
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 1 Jul 2013 03:55:32 +0000 (23:55 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 3 Jul 2013 15:39:26 +0000 (11:39 -0400)
at the nose command line

test/engine/test_pool.py
test/requirements.py

index 4a4fce131e539aa8ab8790056bd7a284671b91d5..7d4be30d062375bc0906436e8a0d01e8f1cd0725 100644 (file)
@@ -788,6 +788,7 @@ class QueuePoolTest(PoolTestBase):
         except tsa.exc.TimeoutError:
             assert int(time.time() - now) == 2
 
+    @testing.requires.threading_with_mock
     def test_timeout_race(self):
         # test a race condition where the initial connecting threads all race
         # to queue.Empty, then block on the mutex.  each thread consumes a
@@ -863,6 +864,7 @@ class QueuePoolTest(PoolTestBase):
         lazy_gc()
         assert not pool._refs
 
+    @testing.requires.threading_with_mock
     def test_waiters_handled(self):
         """test that threads waiting for connections are
         handled when the pool is replaced.
@@ -899,6 +901,7 @@ class QueuePoolTest(PoolTestBase):
         time.sleep(2)
         eq_(len(success), 12)
 
+    @testing.requires.threading_with_mock
     @testing.requires.python26
     def test_notify_waiters(self):
         dbapi = MockDBAPI()
@@ -966,9 +969,11 @@ class QueuePoolTest(PoolTestBase):
         c3 = p.connect()
         assert c3.connection is c2_con
 
+    @testing.requires.threading_with_mock
     def test_no_overflow(self):
         self._test_overflow(40, 0)
 
+    @testing.requires.threading_with_mock
     def test_max_overflow(self):
         self._test_overflow(40, 5)
 
@@ -1146,9 +1151,11 @@ class QueuePoolTest(PoolTestBase):
 
 class SingletonThreadPoolTest(PoolTestBase):
 
+    @testing.requires.threading_with_mock
     def test_cleanup(self):
         self._test_cleanup(False)
 
+    @testing.requires.threading_with_mock
     def test_cleanup_no_gc(self):
         self._test_cleanup(True)
 
index fd3678eb52eda4590d9f05eaf908697e5e665662..449f690e6b6ba4a9d346671f9bcc3ada096b7055 100644 (file)
@@ -638,6 +638,15 @@ class DefaultRequirements(SuiteRequirements):
                 "Not supported on MySQL + Windows"
             )
 
+    def threading_with_mock(self, fn):
+        """Mark tests that use threading and mock at the same time, so they
+        can be excluded using "-a '!threading_with_mock'" - stability
+        issues have been observed with coverage + python 3.3
+
+        """
+        fn.threading_with_mock = True
+        return fn
+
     @property
     def english_locale_on_postgresql(self):
         return skip_if(lambda: against('postgresql') \