Skip to content

Commit ce82b31

Browse files
committed
Refactor: Simplify signal creation syntax in tests for readability
1 parent e8f3213 commit ce82b31

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

datalab_kernel/tests/contract/test_api.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ def test_h5_reproducibility(self):
160160
"""Saved .h5 files ensure full reproducibility."""
161161
# Create and populate workspace
162162
workspace1 = Workspace(backend=StandaloneBackend())
163-
sig = create_signal("signal", np.linspace(0, 10, 100), np.sin(np.linspace(0, 10, 100)))
163+
sig = create_signal(
164+
"signal", np.linspace(0, 10, 100), np.sin(np.linspace(0, 10, 100))
165+
)
164166
img = create_image("image", np.random.rand(64, 64).astype(np.float32))
165167
workspace1.add("signal", sig)
166168
workspace1.add("image", img)
@@ -193,7 +195,9 @@ class TestDataIntegrity:
193195
def test_add_creates_copy(self):
194196
"""Adding an object creates an independent copy."""
195197
workspace = Workspace(backend=StandaloneBackend())
196-
original = create_signal("test", np.array([1.0, 2.0, 3.0]), np.array([4.0, 5.0, 6.0]))
198+
original = create_signal(
199+
"test", np.array([1.0, 2.0, 3.0]), np.array([4.0, 5.0, 6.0])
200+
)
197201

198202
workspace.add("test", original)
199203

datalab_kernel/tests/unit/test_objects.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ def test_signal_dtype_conversion(self):
7979

8080
def test_signal_repr(self):
8181
"""Verify signal repr."""
82-
signal = create_signal(
83-
"test", np.array([1, 2, 3]), np.array([4, 5, 6])
84-
)
82+
signal = create_signal("test", np.array([1, 2, 3]), np.array([4, 5, 6]))
8583

8684
repr_str = repr(signal)
8785

0 commit comments

Comments
 (0)