import unittest from unitpy.GeneralTests import GeneralTests from tudelft.utilities.immutablelist.MapList import MapList from tudelft.utilities.immutablelist.FixedList import FixedList from typing import List class MapListTest (unittest.TestCase, GeneralTests[MapList]): list1 = FixedList((5, 8, 2)) list2 = FixedList( [5, 5, 4, 3]) f = lambda v : v + 1 f2 = lambda v : v + 2 map1 = MapList(f, list1) map1a = MapList(f, list1) map2 = MapList(f2, list1) map3 = MapList(f, list2) #Override def getGeneralTestData(self)->List[List[MapList]]: return [[self.map1, self.map1a], [self.map2],[self.map3]] #Override def getGeneralTestStrings(self)->List[str] : return ["\\[6,9,3\\]", "\\[7,10,4\\]", "\\[6,6,5,4\\]"]