Skip to content

Commit 32d7df7

Browse files
CopilotRouthleck
andcommitted
Fix trailing whitespace in test_joint_eq.py
Co-authored-by: Routhleck <[email protected]>
1 parent 98f9f3f commit 32d7df7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

brainpy/integrators/tests/test_joint_eq.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,37 +135,37 @@ def test_second_order_ode(self):
135135
# Split into: dx/dt = v, dv/dt = -k*x - c*v
136136
k = 1.0 # spring constant
137137
c = 0.1 # damping
138-
138+
139139
def dx(x, t, v):
140140
"""dx/dt = v"""
141141
return v
142-
142+
143143
def dv(v, t, x):
144144
"""dv/dt = -k*x - c*v"""
145145
return -k * x - c * v
146-
146+
147147
# Create joint equation
148148
eq = JointEq(dx, dv)
149-
149+
150150
# Test call
151151
result = eq(x=1.0, v=0.0, t=0.0)
152152
self.assertEqual(len(result), 2)
153153
self.assertEqual(result[0], 0.0) # dx/dt = v = 0
154154
self.assertEqual(result[1], -k * 1.0) # dv/dt = -k*x
155-
155+
156156
def test_second_order_ode_wrong_signature(self):
157157
"""Test that wrong signature gives helpful error message"""
158158
# WRONG: both x and v before t in dx function
159159
def dx_wrong(x, v, t):
160160
return v
161-
161+
162162
def dv(v, t, x):
163163
return -x
164-
164+
165165
# This should raise an error with helpful message
166166
with self.assertRaises(DiffEqError) as cm:
167167
JointEq(dx_wrong, dv)
168-
168+
169169
# Check that error message is helpful
170170
error_msg = str(cm.exception)
171171
self.assertIn('state variable', error_msg.lower())

0 commit comments

Comments
 (0)