<commit_before>import unittest
from numpy import zeros
from gbdxtools.images.mixins.geo import PlotMixin


class PlotMock(np.ndarray, PlotMixin):

    @property
    def _rgb_bands(self):
        return [3,1,2]

    @property
    def _ndvi_bands(self):
        return [6,3]

    def _read(self, arr):
        return arr


class PlotTest(unittest.TestCase):


    @classmethod
    def setUpClass(cls):
        cls.zero = np.zeros((8,8,8))
        cls.plotmock = cls.zero.view(PlotMock) 

    def test_plot_rgb(self):
        cls.plotmock.plot()

    def test_plot_ndvi(self):
        cls.plotmock.plot(spec="ndvi")

    def test_plot_1_band(self):
        cls.plotmock.plot(bands=[1])

    def test_plot_3_band(self):
        cls.plotmock.plot(bands=[3,2,1])

    def test_plot_4_band_fail(self):
        with self.assertRaises(AssertionError):
            cls.plotmock.plot(bands=[4,3,2,1])<commit_msg>add test for plots<commit_after>import unittest
import numpy as np
from gbdxtools.images.mixins.geo import PlotMixin


class PlotMock(np.ndarray, PlotMixin):

    @property
    def _rgb_bands(self):
        return [3,1,2]

    @property
    def _ndvi_bands(self):
        return [6,3]

    def _read(self, arr, **kwargs):
        return arr


class PlotTest(unittest.TestCase):


    @classmethod
    def setUpClass(cls):
        cls.zero = np.zeros((8,8,8))
        cls.plotmock = cls.zero.view(PlotMock) 

    def test_plot_rgb(self):
        self.plotmock.plot()

    def test_plot_ndvi(self):
        self.plotmock.plot(spec="ndvi")

    def test_plot_1_band(self):
        self.plotmock.plot(bands=[1])

    def test_plot_3_band(self):
        self.plotmock.plot(bands=[3,2,1])

    def test_plot_4_band_fail(self):
        with self.assertRaises(AssertionError):
            self.plotmock.plot(bands=[4,3,2,1])
{'fraction_non_alphanumeric': 0.12162905888827738, 'fraction_numerical': 0.020913593835993397, 'mean_word_length': 2.892933618843683, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1272801', 'n_tokens_mistral': 669, 'n_tokens_neox': 640, 'n_words': 111}