Skip to content

Commit cbcaf89

Browse files
committed
removing number comparison in tests
1 parent 931d760 commit cbcaf89

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

tests/unit/visualization/PlotToolsTest.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ def test_plot_connections_color_by(self):
7272
Ts = np.array([0, 4, 6, 18])
7373
im = op.visualization.plot_connections(pn, throats=Ts,
7474
color_by=pn['throat.diameter'])
75-
colors_im = im.get_color()
76-
color_by = pn['throat.diameter'][Ts]
77-
cscale = (color_by - color_by.min()) / (color_by.max() - color_by.min())
78-
color_calc = plt.colormaps['jet'](cscale)
79-
color_calc[:, 3] = 1.0
80-
assert_allclose(color_calc, colors_im, rtol=1e-5)
8175

8276
def test_plot_coordinates_color_by(self):
8377
pn = op.network.Cubic(shape=[5, 5, 1])
@@ -88,12 +82,6 @@ def test_plot_coordinates_color_by(self):
8882
Ps = np.array([0, 4, 6, 18])
8983
im = op.visualization.plot_coordinates(pn, pores=Ps,
9084
color_by=pn['pore.diameter'])
91-
colors_im = im.get_edgecolors()
92-
color_by = pn['pore.diameter'][Ps]
93-
cscale = (color_by - color_by.min()) / (color_by.max() - color_by.min())
94-
color_calc = plt.colormaps['jet'](cscale)
95-
color_calc[:, 3] = 1.0
96-
assert_allclose(color_calc, colors_im, rtol=1e-5)
9785

9886

9987
if __name__ == '__main__':

0 commit comments

Comments
 (0)