mit neuen venv und exe-Files

This commit is contained in:
2024-11-03 17:26:54 +01:00
parent 07c05a338a
commit 0c373ff593
15115 changed files with 1998469 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
from __future__ import print_function
from __future__ import absolute_import
from gevent.thread import allocate_lock
import gevent.testing as greentest
try:
from _thread import allocate_lock as std_allocate_lock
except ImportError: # Py2
from thread import allocate_lock as std_allocate_lock
class TestLock(greentest.TestCase):
def test_release_unheld_lock(self):
std_lock = std_allocate_lock()
g_lock = allocate_lock()
with self.assertRaises(Exception) as exc:
std_lock.release()
std_exc = exc.exception
with self.assertRaises(Exception) as exc:
g_lock.release()
g_exc = exc.exception
self.assertIsInstance(g_exc, type(std_exc))
if __name__ == '__main__':
greentest.main()