Skip to content

Commit

Permalink
Remove unnecessary print statements (#646)
Browse files Browse the repository at this point in the history
* CLN : Remove unnecessary print statements

and commented out/dead tests

	modified:   chaco/plotscrollbar.py
	modified:   chaco/tests/test_colormapper.py
	modified:   examples/demo/nonlinear_color_mapping.py

* CLN : Rename testcase to ColorMapperTestCase
  • Loading branch information
Poruri Sai Rahul authored Apr 12, 2021
1 parent e121bde commit 0b2a816
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 36 deletions.
2 changes: 1 addition & 1 deletion chaco/plotscrollbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def _handle_dataspace_update(self):
else:
ticksize = 1
foo = (totalmin, totalmax, view, ticksize)
print("scrollrange:", foo)

self.trait_setq(
range=foo,
scroll_position=max(
Expand Down
35 changes: 1 addition & 34 deletions chaco/tests/test_colormapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from chaco.api import ArrayDataSource, ColorMapper, DataRange1D


class LinearSegmentedColormapTestCase(unittest.TestCase):
class ColormapperTestCase(unittest.TestCase):
def setUp(self):
""" Set up called before each test case. """

Expand Down Expand Up @@ -130,36 +130,3 @@ def test_no_alpha(self):
"red": [(0.0, 0.0, 0.0), (1.0, 1.0, 1.0)],
}
assert self.colormap._segmentdata == sd


## def test_no_interpolation(self):
## grayscale_colors = array([[0.0,0.0,0.0,1.0], [1.0, 1.0, 1.0, 1.0]])
## grayscale_bins = array([0.0, 1.0])
## grayscale_steps = array([1])

## colormap = LinearSegmentedColormap(
## grayscale_colors, grayscale_bins, grayscale_steps
## )

## a = array([0.0, 0.25, 0.75, 1.0])
## b = colormap.map_array(a)
## result = ravel(b[:,:1])
## expected = array([0.0, 0.0, 1.0, 1.0])

## close = allclose(result, expected, atol=0.02)
## self.assert_(close,
## "Map with no interpolation broken. Expected %s. Got %s" % (expected, result))

## def test_value_bands(self):

## grayscale_colors = array([[0.0,0.0,0.0,1.0], [1.0, 1.0, 1.0, 1.0]])
## grayscale_bins = array([0.0, 1.0])
## grayscale_steps = array([1])

## colormap = LinearSegmentedColormap(
## grayscale_colors, grayscale_bins, grayscale_steps
## )

## colormap._recalculate()

## print '**************', colormap._color_bands, colormap._value_bands
1 change: 0 additions & 1 deletion examples/demo/nonlinear_color_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,5 @@ def _colorbar_scale_changed(self):
domain_bounds=(0.0, 0.0, 2.0, 2.0),
grid_size=(200, 200),
)
# print "data bounds: ", grid.data_min, grid.data_max
demo = DataGridView(model=grid)
demo.configure_traits()

0 comments on commit 0b2a816

Please sign in to comment.