ff1bfcb0499605f2cedf9b2aa53dafff2cd4a8c0,test/augmenters/test_contrast.py,TestCLAHE,_test_single_image_3d_rgb_to_x,#Any#Any#Any#,1098

Before Change


        mock_all_channel_clahe._augment_images.side_effect = \
            side_effect_all_channel_clahe

        mock_change_colorspace_inv = mock.Mock()
        mock_change_colorspace_inv._augment_images.side_effect = \
            side_effect_change_colorspace_inv

        clahe = iaa.CLAHE(
            clip_limit=1,
            tile_grid_size_px=3,
            tile_grid_size_px_min=2,
            from_colorspace=iaa.CLAHE.RGB,
            to_colorspace=to_colorspace)
        clahe.all_channel_clahe = mock_all_channel_clahe
        clahe.intensity_channel_based_applier.change_colorspace = \
            mock_change_cs
        clahe.intensity_channel_based_applier.change_colorspace_inv = \
            mock_change_colorspace_inv

        img3d_aug = clahe.augment_image(np.copy(img3d))
        expected1 = img3d + 1
        expected2 = np.copy(expected1)
        expected2[..., channel_idx] += 2
        expected3 = np.copy(expected2) + 3
        assert np.array_equal(img3d_aug, expected3)

        mock_change_cs = mock_change_cs._augment_images
        mock_all_channel_clahe = mock_all_channel_clahe._augment_images
        mock_change_colorspace_inv = mock_change_colorspace_inv._augment_images

        assert mock_change_cs.call_count == 1
        assert mock_all_channel_clahe.call_count == 1
        assert mock_change_colorspace_inv.call_count == 1

After Change


    @classmethod
    def _test_single_image_3d_rgb_to_x(cls, to_colorspace, channel_idx):
        fname_cs = "imgaug.augmenters.color.change_colorspace_"
        with mock.patch(fname_cs) as mock_cs:
            img = [
                [0, 1, 2, 3, 4],
                [5, 6, 7, 8, 9],
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: aleju/imgaug
Commit Name: ff1bfcb0499605f2cedf9b2aa53dafff2cd4a8c0
Time: 2019-09-07
Author: kontakt@ajung.name
File Name: test/augmenters/test_contrast.py
Class Name: TestCLAHE
Method Name: _test_single_image_3d_rgb_to_x


Project Name: home-assistant/home-assistant
Commit Name: 519d9f2fd01751492909e574b8ba3812487d7d6b
Time: 2016-10-23
Author: paulus@paulusschoutsen.nl
File Name: tests/components/test_api.py
Class Name: TestAPI
Method Name: test_api_get_error_log


Project Name: mlflow/mlflow
Commit Name: 2ee4c64a5d8d089ca23195e835fd6d1b986fcba8
Time: 2019-05-07
Author: aaron@databricks.com
File Name: tests/tracking/test_fluent.py
Class Name:
Method Name: test_start_run_with_parent