(self)
| 1061 | self.assertListEqual(data, saved, "data has been modified") |
| 1062 | |
| 1063 | def test_order_doesnt_matter(self): |
| 1064 | # Test that the order of data points doesn't change the result. |
| 1065 | |
| 1066 | # CAUTION: due to floating-point rounding errors, the result actually |
| 1067 | # may depend on the order. Consider this test representing an ideal. |
| 1068 | # To avoid this test failing, only test with exact values such as ints |
| 1069 | # or Fractions. |
| 1070 | data = [1, 2, 3, 3, 3, 4, 5, 6]*100 |
| 1071 | expected = self.func(data) |
| 1072 | random.shuffle(data) |
| 1073 | actual = self.func(data) |
| 1074 | self.assertEqual(expected, actual) |
| 1075 | |
| 1076 | def test_type_of_data_collection(self): |
| 1077 | # Test that the type of iterable data doesn't effect the result. |
nothing calls this directly
no test coverage detected