source: utilitiespy/test/immutablelist/FixedListTest.py@ 958

Last change on this file since 958 was 285, checked in by wouter, 3 years ago

#97 added Outer and FixedList plus tests. Version now 1.0.1

File size: 756 bytes
RevLine 
[285]1import unittest
2from tudelft.utilities.immutablelist.FixedList import FixedList
3
4class FixedListTest (unittest.TestCase) :
5 #abString = "{\"list\":[\"a\",\"b\"]}"
6 values = ("a", "b")
7 listStr = FixedList(values)
8
9 valuesFloats = [2., 3.]
10 listFloats = FixedList(valuesFloats)
11 listFloats1 = FixedList(valuesFloats)
12 #loatsString = "{\"list\":[[\"java.lang.Float\",2.0],[\"java.lang.Float\",3.0]]}";
13
14 floatsList = [ 3., 4. ]
15
16
17 def testEqual(self):
18 self.assertNotEqual(self.listStr, self.listFloats)
19 self.assertNotEqual(hash(self.listStr), hash(self.listFloats))
20
21 self.assertEqual(self.listFloats, self.listFloats1)
22 self.assertEqual(hash(self.listFloats), hash(self.listFloats1))
23
Note: See TracBrowser for help on using the repository browser.