Skip to content

Commit 3466e7a

Browse files
committed
Unit tests for Surface
1 parent 30a4b62 commit 3466e7a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test_blocks.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,17 @@ def test_Quiver(self):
309309
block = amp.blocks.Quiver(X, Y, U, V)
310310
return amp.Animation([block])
311311

312+
@animation_compare(baseline_images='Blocks/Surface', nframes=3)
313+
def test_Surface(self):
314+
x = np.linspace(-2*np.pi, 2*np.pi, 100)
315+
t = np.linspace(0, 2*np.pi, 3)
316+
317+
X, Y, T = np.meshgrid(x, x, t)
318+
Z = np.sin(X**2+Y**2-T)
319+
320+
block = amp.blocks.Surface(X[:, :, 0], Y[:, :, 0], Z, t_axis=2)
321+
return amp.Animation([block])
322+
312323
@animation_compare(baseline_images='Blocks/Nuke', nframes=3)
313324
def test_Nuke(self):
314325
ax = plt.gca()

0 commit comments

Comments
 (0)