classification
Title: test_statistics fails after test_time
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: bbayles, serhiy.storchaka, skrah
Priority: normal Keywords: patch

Created on 2018-07-21 13:17 by serhiy.storchaka, last changed 2018-07-21 18:41 by skrah. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8376 merged bbayles, 2018-07-21 14:24
PR 8383 merged miss-islington, 2018-07-21 17:54
PR 8384 merged miss-islington, 2018-07-21 17:55
Messages (5)
msg322098 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-07-21 13:17
$ ./python -m test -v test_time test_statistics
...
======================================================================
FAIL: test_decimals_exact (test.test_statistics.TestHarmonicMean)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_statistics.py", line 1484, in test_decimals_exact
    self.assertEqual(self.func(data), D(66528)/70723)
AssertionError: Decimal('0.9406840773157247288717955969') != Decimal('0.9406840773157247288717955970')

======================================================================
FAIL: test_repeated_single_value (test.test_statistics.TestHarmonicMean) (x=Decimal('4.125'), count=2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_statistics.py", line 1332, in test_repeated_single_value
    self.assertEqual(self.func(data), x)
AssertionError: Decimal('4.124999999999999999999999999') != Decimal('4.125')

======================================================================
FAIL: test_repeated_single_value (test.test_statistics.TestHarmonicMean) (x=Decimal('4.125'), count=5)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_statistics.py", line 1332, in test_repeated_single_value
    self.assertEqual(self.func(data), x)
AssertionError: Decimal('4.124999999999999999999999999') != Decimal('4.125')

======================================================================
FAIL: test_repeated_single_value (test.test_statistics.TestHarmonicMean) (x=Decimal('4.125'), count=10)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_statistics.py", line 1332, in test_repeated_single_value
    self.assertEqual(self.func(data), x)
AssertionError: Decimal('4.124999999999999999999999999') != Decimal('4.125')

======================================================================
FAIL: test_repeated_single_value (test.test_statistics.TestHarmonicMean) (x=Decimal('4.125'), count=20)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_statistics.py", line 1332, in test_repeated_single_value
    self.assertEqual(self.func(data), x)
AssertionError: Decimal('4.124999999999999999999999999') != Decimal('4.125')

----------------------------------------------------------------------
msg322115 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2018-07-21 17:54
New changeset 938045f335b52ddb47076e9fbe4229a33b4bd9be by Stefan Krah (Bo Bayles) in branch 'master':
bpo-34179:  Make sure decimal context doesn't affect other tests.  (#8376)
https://github.com/python/cpython/commit/938045f335b52ddb47076e9fbe4229a33b4bd9be
msg322117 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2018-07-21 18:38
New changeset 92ce6a64afcebd414def3b80b18b56448792a587 by Stefan Krah (Miss Islington (bot)) in branch '3.7':
bpo-34179:  Make sure decimal context doesn't affect other tests.  (GH-8376) (#8383)
https://github.com/python/cpython/commit/92ce6a64afcebd414def3b80b18b56448792a587
msg322118 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2018-07-21 18:38
New changeset 9c136700aa1f755fa2ea64594688a0930b716597 by Stefan Krah (Miss Islington (bot)) in branch '3.6':
bpo-34179:  Make sure decimal context doesn't affect other tests.  (GH-8376) (#8384)
https://github.com/python/cpython/commit/9c136700aa1f755fa2ea64594688a0930b716597
msg322119 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2018-07-21 18:41
Ok, looks fixed to me.
History
Date User Action Args
2018-07-21 18:41:00skrahsetstatus: open -> closed
resolution: fixed
messages: + msg322119

stage: patch review -> resolved
2018-07-21 18:38:51skrahsetmessages: + msg322118
2018-07-21 18:38:23skrahsetmessages: + msg322117
2018-07-21 17:55:25miss-islingtonsetpull_requests: + pull_request7914
2018-07-21 17:54:34miss-islingtonsetpull_requests: + pull_request7913
2018-07-21 17:54:18skrahsetnosy: + skrah
messages: + msg322115
2018-07-21 14:35:48serhiy.storchakasetversions: + Python 3.6, Python 3.7
2018-07-21 14:24:40bbaylessetnosy: + bbayles
2018-07-21 14:24:13bbaylessetkeywords: + patch
stage: patch review
pull_requests: + pull_request7907
2018-07-21 13:17:44serhiy.storchakacreate