New submission from Vajrasky Kok: Line 994 of Lib/test/test_statistics.py:
def test_decimal_mismatched_infs_to_nan(self): # Test adding Decimal INFs with opposite sign returns NAN. inf = Decimal('inf') data = [1, 2, inf, 3, -inf, 4] with decimal.localcontext(decimal.ExtendedContext): self.assertTrue(math.isnan(statistics._sum(data))) def test_decimal_mismatched_infs_to_nan(self): # Test adding Decimal INFs with opposite sign raises InvalidOperation. inf = Decimal('inf') data = [1, 2, inf, 3, -inf, 4] with decimal.localcontext(decimal.BasicContext): self.assertRaises(decimal.InvalidOperation, statistics._sum, data) Here is the patch. I also removed unnecessary import. ---------- components: Tests files: fix_shadowed_test_in_test_statistics.patch keywords: patch messages: 212247 nosy: stevenjd, vajrasky priority: normal severity: normal status: open title: Shadowed (duplicate name but different body) test in test_statistics type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file34228/fix_shadowed_test_in_test_statistics.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20780> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com