From 8dc87023d11f27818cfe97dbc737ff6cc3d44fff Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Mon, 29 Jun 2020 22:23:24 -0400 Subject: [PATCH] test from_range; update ASCII colormap labels (i_RGBA) --- python/tests/reference/Colormap/binary.txt | 2 +- python/tests/test_Colormap.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/tests/reference/Colormap/binary.txt b/python/tests/reference/Colormap/binary.txt index 817350aee..976c0202a 100644 --- a/python/tests/reference/Colormap/binary.txt +++ b/python/tests/reference/Colormap/binary.txt @@ -1,5 +1,5 @@ # Creator: damask.Colormap v99.99.99-9999-pytest -R G B alpha +1_RGBA 2_RGBA 3_RGBA 4_RGBA 1.0 1.0 1.0 1.0 0.996078431372549 0.996078431372549 0.996078431372549 1.0 0.9921568627450981 0.9921568627450981 0.9921568627450981 1.0 diff --git a/python/tests/test_Colormap.py b/python/tests/test_Colormap.py index 8d3d51018..fcc2eca81 100644 --- a/python/tests/test_Colormap.py +++ b/python/tests/test_Colormap.py @@ -74,9 +74,9 @@ class TestColormap: @pytest.mark.parametrize('format',['ASCII','paraview','GOM','Gmsh']) @pytest.mark.parametrize('model',['rgb','hsv','hsl','xyz','lab','msh']) - def test_from_bounds(self,model,format,tmpdir): + def test_from_range(self,model,format,tmpdir): N = np.random.randint(2,256) - c = Colormap.from_bounds(np.random.rand(3),np.random.rand(3),model=model,N=N) + c = Colormap.from_range(np.random.rand(3),np.random.rand(3),model=model,N=N) c.to_file(tmpdir/'color_out',format=format) @pytest.mark.parametrize('format',['ASCII','paraview','GOM','Gmsh']) @@ -110,7 +110,7 @@ class TestColormap: @pytest.mark.parametrize('model',['rgb','hsv','hsl','lab','invalid']) def test_invalid_color(self,model): with pytest.raises(ValueError): - c = Colormap.from_bounds(-2.+np.random.rand(3),np.random.rand(3),N=10,model=model) # noqa + c = Colormap.from_range(-2.+np.random.rand(3),np.random.rand(3),N=10,model=model) # noqa def test_reversed(self): c_1 = Colormap.from_predefined('stress')