From efa604a9d42ea06491c699c1a9cff15bc2d5c3a2 Mon Sep 17 00:00:00 2001 From: Sarthak Srivastava Date: Sat, 6 Apr 2024 21:44:51 -0400 Subject: [PATCH] Fix convergence plot tests --- .../visualization/tools/tests/test_convergence_plot.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tardis/visualization/tools/tests/test_convergence_plot.py b/tardis/visualization/tools/tests/test_convergence_plot.py index 79751b15c72..bb69e23e68b 100644 --- a/tardis/visualization/tools/tests/test_convergence_plot.py +++ b/tardis/visualization/tools/tests/test_convergence_plot.py @@ -1,4 +1,5 @@ """Tests for Convergence Plots.""" + from copy import deepcopy import pytest @@ -143,7 +144,9 @@ def test_update_plasma_plots(convergence_plots): # check values for t_rad subplot assert convergence_plots.plasma_plot.data[index].xaxis == "x" assert convergence_plots.plasma_plot.data[index].yaxis == "y" - assert convergence_plots.plasma_plot.data[index].y == tuple(t_rad_val) + assert ( + convergence_plots.plasma_plot.data[index].y[:-1] == tuple(t_rad_val) + ).all() assert convergence_plots.plasma_plot.data[index].x == tuple( velocity.to(u.km / u.s).value ) @@ -152,7 +155,9 @@ def test_update_plasma_plots(convergence_plots): # check values for w subplot assert convergence_plots.plasma_plot.data[index].xaxis == "x2" assert convergence_plots.plasma_plot.data[index].yaxis == "y2" - assert convergence_plots.plasma_plot.data[index].y == tuple(w_val) + assert ( + convergence_plots.plasma_plot.data[index].y[:-1] == tuple(w_val) + ).all() assert convergence_plots.plasma_plot.data[index].x == tuple( velocity.to(u.km / u.s).value )