MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_shift_data_exact

Method test_shift_data_exact

Lib/test/test_statistics.py:1987–1994  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1985 self.assertApproxEqual(self.func(data), expected)
1986
1987 def test_shift_data_exact(self):
1988 # Like test_shift_data, but result is always exact.
1989 raw = [1, 3, 3, 4, 5, 7, 9, 10, 11, 16]
1990 assert all(x==int(x) for x in raw)
1991 expected = self.func(raw)
1992 shift = 10**9
1993 data = [x + shift for x in raw]
1994 self.assertEqual(self.func(data), expected)
1995
1996 def test_iter_list_same(self):
1997 # Test that iter data and list data give the same result.

Callers

nothing calls this directly

Calls 3

allFunction · 0.85
funcMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected