From ae90b46d8a6c6abbac2f8c6df0f40786fd87ef15 Mon Sep 17 00:00:00 2001 From: arman-ddl <122062464+arman-ddl@users.noreply.github.com> Date: Fri, 15 Mar 2024 10:41:50 -0700 Subject: [PATCH] Apply suggestions from code review Per @chipkent. Co-authored-by: Chip Kent <5250374+chipkent@users.noreply.github.com> --- py/server/deephaven/jcompat.py | 2 +- py/server/tests/test_jcompat.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)