diff --git a/.gitignore b/.gitignore
index 83f9b0d0..fc62ef39 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@ eggs
 parts
 testing.log
 .dir-locals.el
+data.fs*
diff --git a/src/ZEO/__init__.py b/src/ZEO/__init__.py
index 4cf580e7..ba340e4c 100644
--- a/src/ZEO/__init__.py
+++ b/src/ZEO/__init__.py
@@ -40,7 +40,7 @@ def connection(*args, **kw):
         return db.open_then_close_db_when_connection_closes()
     except Exception:
         db.close()
-        ra
+        raise
 
 def server(path=None, blob_dir=None, storage_conf=None, zeo_conf=None,
            port=0, threaded=True, **kw):
diff --git a/tox.ini b/tox.ini
index cf839f76..33079fd5 100644
--- a/tox.ini
+++ b/tox.ini
@@ -21,6 +21,7 @@ deps =
     zope.testing
     zope.testrunner
     mock
+    msgpack
 # ZopeUndo is needed as soft-dependency for a regression test
     ZopeUndo
 [testenv:simple]

mistake in writing
`ZEO/src/ZEO/__init__.py`

line 43 `ra
`should be `raise
`
diff --git a/src/ZEO/tests/testZEO.py b/src/ZEO/tests/testZEO.py
index 546b7091..9bba0b99 100644
--- a/src/ZEO/tests/testZEO.py
+++ b/src/ZEO/tests/testZEO.py
@@ -75,6 +75,94 @@ class CreativeGetState(persistent.Persistent):
         return super(CreativeGetState, self).__getstate__()
 
 
+
+class Test_convenience_functions(unittest.TestCase):
+
+    def test_ZEO_client_convenience(self):
+        import mock
+        import ZEO
+
+        client_thread = mock.Mock(
+            spec=['call', 'async', 'async_iter', 'wait'])
+        client = ZEO.client(
+            8001, wait=False, _client_factory=client_thread)
+        self.assertIsInstance(client, ClientStorage)
+
+    def test_ZEO_DB_convenience_ok(self):
+        import mock
+        import ZEO
+
+        client_mock = mock.Mock(spec=['close'])
+        client_patch = mock.patch('ZEO.client', return_value=client_mock)
+        DB_patch = mock.patch('ZODB.DB')
+
+        dummy = object()
+
+        with client_patch as client:
+            with DB_patch as patched:
+                db = ZEO.DB(dummy)
+
+        self.assertIs(db, patched())
+        client.assert_called_once_with(dummy)
+        client_mock.close.assert_not_called()
+
+    def test_ZEO_DB_convenience_error(self):
+        import mock
+        import ZEO
+
+        client_mock = mock.Mock(spec=['close'])
+        client_patch = mock.patch('ZEO.client', return_value=client_mock)
+        DB_patch = mock.patch('ZODB.DB', side_effect=ValueError)
+
+        dummy = object()
+
+        with client_patch as client:
+            with DB_patch:
+                with self.assertRaises(ValueError):
+                    ZEO.DB(dummy)
+
+        client.assert_called_once_with(dummy)
+        client_mock.close.assert_called_once()
+
+    def test_ZEO_connection_convenience_ok(self):
+        import mock
+        import ZEO
+
+        ret = object()
+        DB_mock = mock.Mock(spec=[
+            'close', 'open_then_close_db_when_connection_closes'])
+        DB_mock.open_then_close_db_when_connection_closes.return_value = ret
+        DB_patch = mock.patch('ZEO.DB', return_value=DB_mock)
+
+        dummy = object()
+
+        with DB_patch as patched:
+            conn = ZEO.connection(dummy)
+
+        self.assertIs(conn, ret)
+        patched.assert_called_once_with(dummy)
+        DB_mock.close.assert_not_called()
+
+    def test_ZEO_connection_convenience_value(self):
+        import mock
+        import ZEO
+
+        DB_mock = mock.Mock(spec=[
+            'close', 'open_then_close_db_when_connection_closes'])
+        otc = DB_mock.open_then_close_db_when_connection_closes
+        otc.side_effect = ValueError
+        DB_patch = mock.patch('ZEO.DB', return_value=DB_mock)
+
+        dummy = object()
+
+        with DB_patch as patched:
+            with self.assertRaises(ValueError):
+                ZEO.connection(dummy)
+
+        patched.assert_called_once_with(dummy)
+        DB_mock.close.assert_called_once()
+
+
 class MiscZEOTests(object):
     """ZEO tests that don't fit in elsewhere."""
 
@@ -1636,7 +1724,9 @@ class ServerManagingClientStorageForIExternalGCTest(
         ZEO.ClientStorage._check_blob_cache_size(self.blob_dir, 0)
 
 def test_suite():
-    suite = unittest.TestSuite()
+    suite = unittest.TestSuite((
+        unittest.makeSuite(Test_convenience_functions),
+    ))
 
     zeo = unittest.TestSuite()
     zeo.addTest(unittest.makeSuite(ZODB.tests.util.AAAA_Test_Runner_Hack))

pip install -e .[test]
parse_log_pytest
requirements.txt
zope-testrunner manuel random2 mock msgpack-python pytest
3.4
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
BTrees==4.11.3
certifi==2021.5.30
cffi==1.15.1
importlib-metadata==4.8.3
iniconfig==1.1.1
manuel==1.13.0
mock==5.2.0
msgpack-python==0.5.6
packaging==21.3
persistent==4.9.3
pluggy==1.0.0
py==1.11.0
pycparser==2.21
pyparsing==3.1.4
pytest==7.0.1
random2==1.0.2
six==1.17.0
tomli==1.2.3
transaction==3.1.0
typing_extensions==4.1.1
zc.lockfile==2.0
ZConfig==3.6.1
zdaemon==4.4
-e git+https://github.com/zopefoundation/ZEO.git@fdcc27393cf83f3e3b8f350a9b90aa7fb4b81d2f#egg=ZEO
zipp==3.6.0
ZODB==5.8.1
zodbpickle==2.6
zope.exceptions==4.6
zope.interface==5.5.2
zope.testing==5.0.1
zope.testrunner==5.6

name: ZEO
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - btrees==4.11.3
      - cffi==1.15.1
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - manuel==1.13.0
      - mock==5.2.0
      - msgpack-python==0.5.6
      - packaging==21.3
      - persistent==4.9.3
      - pluggy==1.0.0
      - py==1.11.0
      - pycparser==2.21
      - pyparsing==3.1.4
      - pytest==7.0.1
      - random2==1.0.2
      - six==1.17.0
      - tomli==1.2.3
      - transaction==3.1.0
      - typing-extensions==4.1.1
      - zc-lockfile==2.0
      - zconfig==3.6.1
      - zdaemon==4.4
      - zipp==3.6.0
      - zodb==5.8.1
      - zodbpickle==2.6
      - zope-exceptions==4.6
      - zope-interface==5.5.2
      - zope-testing==5.0.1
      - zope-testrunner==5.6
prefix: /opt/conda/envs/ZEO

src/ZEO/tests/testZEO.py::Test_convenience_functions::test_ZEO_connection_convenience_value
src/ZEO/tests/testZEO.py::Test_convenience_functions::test_ZEO_DB_convenience_error src/ZEO/tests/testZEO.py::Test_convenience_functions::test_ZEO_DB_convenience_ok src/ZEO/tests/testZEO.py::Test_convenience_functions::test_ZEO_client_convenience src/ZEO/tests/testZEO.py::Test_convenience_functions::test_ZEO_connection_convenience_ok src/ZEO/tests/testZEO.py::test_server_status src/ZEO/tests/testZEO.py::test_ruok src/ZEO/tests/testZEO.py::test_runzeo_msgpack_support src/ZEO/tests/testZEO.py::MultiprocessingTests::test_work_with_multiprocessing src/ZEO/tests/testZEO.py::test_suite
.gitignore tox.ini src/ZEO/__init__.py
.gitignore tox.ini src/ZEO/__init__.py