From d7ec3c182d52e2d5087ccb007cfd6e735e6c9de9 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Wed, 17 Jul 2019 23:00:46 -0400 Subject: [PATCH] tuples --- lbry/tests/unit/wallet/server/test_metrics.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lbry/tests/unit/wallet/server/test_metrics.py b/lbry/tests/unit/wallet/server/test_metrics.py index 63a2bc75f..44438e9f4 100644 --- a/lbry/tests/unit/wallet/server/test_metrics.py +++ b/lbry/tests/unit/wallet/server/test_metrics.py @@ -6,13 +6,13 @@ from lbry.wallet.server.metrics import ServerLoadData, calculate_percentiles class TestPercentileCalculation(unittest.TestCase): def test_calculate_percentiles(self): - self.assertEqual(calculate_percentiles([]), [0, 0, 0, 0, 0, 0, 0]) - self.assertEqual(calculate_percentiles([1]), [1, 1, 1, 1, 1, 1, 1]) - self.assertEqual(calculate_percentiles([1, 2]), [1, 1, 1, 1, 2, 2, 2]) - self.assertEqual(calculate_percentiles([1, 2, 3]), [1, 1, 1, 2, 3, 3, 3]) - self.assertEqual(calculate_percentiles([1, 2, 3, 4]), [1, 1, 1, 2, 3, 4, 4]) - self.assertEqual(calculate_percentiles([1, 2, 3, 4, 5, 6]), [1, 1, 2, 3, 5, 6, 6]) - self.assertEqual(calculate_percentiles(list(range(1, 101))), [1, 5, 25, 50, 75, 95, 100]) + self.assertEqual(calculate_percentiles([]), (0, 0, 0, 0, 0, 0, 0)) + self.assertEqual(calculate_percentiles([1]), (1, 1, 1, 1, 1, 1, 1)) + self.assertEqual(calculate_percentiles([1, 2]), (1, 1, 1, 1, 2, 2, 2)) + self.assertEqual(calculate_percentiles([1, 2, 3]), (1, 1, 1, 2, 3, 3, 3)) + self.assertEqual(calculate_percentiles([4, 1, 2, 3]), (1, 1, 1, 2, 3, 4, 4)) + self.assertEqual(calculate_percentiles([1, 2, 3, 4, 5, 6]), (1, 1, 2, 3, 5, 6, 6)) + self.assertEqual(calculate_percentiles(list(range(1, 101))), (1, 5, 25, 50, 75, 95, 100)) class TestCollectingMetrics(unittest.TestCase):