import unittest from tudelft.utilities.immutablelist.FixedList import FixedList class FixedListTest (unittest.TestCase) : #abString = "{\"list\":[\"a\",\"b\"]}" values = ("a", "b") listStr = FixedList(values) valuesFloats = [2., 3.] listFloats = FixedList(valuesFloats) listFloats1 = FixedList(valuesFloats) #loatsString = "{\"list\":[[\"java.lang.Float\",2.0],[\"java.lang.Float\",3.0]]}"; floatsList = [ 3., 4. ] def testEqual(self): self.assertNotEqual(self.listStr, self.listFloats) self.assertNotEqual(hash(self.listStr), hash(self.listFloats)) self.assertEqual(self.listFloats, self.listFloats1) self.assertEqual(hash(self.listFloats), hash(self.listFloats1))