#  Numenta Platform for Intelligent Computing (NuPIC)
#  Copyright (C) 2019, Numenta, Inc.  Unless you have an agreement
#  with Numenta, Inc., for a separate license for this software code, the
#  following terms and conditions apply:
#
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Affero Public License version 3 as
#  published by the Free Software Foundation.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#  See the GNU Affero Public License for more details.
#
#  You should have received a copy of the GNU Affero Public License
#  along with this program.  If not, see http://www.gnu.org/licenses.
#
#  http://numenta.org/licenses/
#

import unittest
from unittest import TestCase

from nupic.research.frameworks.pytorch.dataset_utils import ProgressiveRandomResizedCrop


class ProgressiveRandomResizedCropTest(TestCase):
    def test_set_epoch(self):
        transform = ProgressiveRandomResizedCrop(progressive_resize={
            "0": 1,
            "2": 2,
            "5": 3,
        }, transforms=[])
        expected = [1] * 2 + [2] * 3 + [3] * 5
        actual = []
        for epoch in range(10):
            transform.set_epoch(epoch)
            actual.append(transform.img_size)

        self.assertEqual(expected, actual)


if __name__ == "__main__":
    unittest.main()

@@ -1144,11 +1144,9 @@
     
-%220%22
+0
 : 1,
@@ -1162,11 +1162,9 @@
     
-%222%22
+2
 : 2,
@@ -1180,11 +1180,9 @@
     
-%225%22
+5
 : 3,
@@ -1195,23 +1195,8 @@
    %7D
-, transforms=%5B%5D
 )%0A  
@@ -1369,17 +1369,19 @@
 sform.im
-g
+age
 _size)%0A%0A

fix test