diff --git a/py/server/deephaven/jcompat.py b/py/server/deephaven/jcompat.py index f210db10271..f3c912933b2 100644 --- a/py/server/deephaven/jcompat.py +++ b/py/server/deephaven/jcompat.py @@ -307,7 +307,7 @@ def _j_array_to_series(dtype: DType, j_array: jpy.JType, conv_null: bool) -> pd. class SafeCloseable(JObjectWrapper): - """A context manager wrapper of Java SafeCloseable to emulate Java try-with-resources.""" + """A context manager wrapper to allow Java SafeCloseable to be used in with statements.""" j_object_type = jpy.get_type("io.deephaven.util.SafeCloseable") diff --git a/py/server/tests/test_jcompat.py b/py/server/tests/test_jcompat.py index 1de8d675c95..8f28b431639 100644 --- a/py/server/tests/test_jcompat.py +++ b/py/server/tests/test_jcompat.py @@ -33,7 +33,7 @@ def int_to_str(v: int) -> str: def test_safe_closeable(self): safe_closeable = SafeCloseable(_JSharedContext.makeSharedContext()) with safe_closeable: - pass + self.assertEqual(safe_closeable.closed, False) self.assertEqual(safe_closeable.closed, True)