classification
Title: test_tcl fails on the 3.7 branch
Type: Stage:
Components: Tests, Tkinter Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: doko, serhiy.storchaka, xtreak
Priority: normal Keywords:

Created on 2018-07-21 08:24 by doko, last changed 2018-07-22 01:29 by xtreak.

Messages (6)
msg322086 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2018-07-21 08:24
test_tcl fails at least on the 3.7 branch with:

======================================================================
FAIL: test_join (test.test_tcl.TclTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/test/test_tcl.py", line 670, in test_join
    check('{spam}')
  File "/usr/lib/python3.7/test/test_tcl.py", line 660, in check
    self.assertEqual(unpack(unpack(join([[value]]))), value)
AssertionError: 'spam' != '{spam}'
- spam
+ {spam}
? +    +
msg322089 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-07-21 09:12
Can you please add information about your OS and how you are running the tests? It passes in Travis for 3.7 branch for my last PR. Tests were added as part of https://bugs.python.org/issue33974 .

Ref : https://travis-ci.org/python/cpython/jobs/406532961#L2397

I tried the latest 3.7 branch on my Ubuntu box and tests run fine

➜  cpython git:(25326de) ./python
Python 3.7.0+ (remotes/upstream/3.7:25326de, Jul 21 2018, 09:05:57)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
➜  cpython git:(25326de) time ./python -m unittest -v test.test_tcl.TclTest.test_join
patchlevel = 8.6.5
test_join (test.test_tcl.TclTest) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.013s

OK
./python -m unittest -v test.test_tcl.TclTest.test_join  0.24s user 0.01s system 97% cpu 0.249 total


Thanks
msg322091 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2018-07-21 09:33
seen on Linux x86_64, using Tcl 8.6.8, running the tests in the installed location.
msg322121 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-07-21 19:04
Thanks by install do you mean running the test with an installed version of python 3.7.0 from package manager or as a downloaded binary ? I can reproduce it with an installed version from anaconda but the binary compiled on the latest 3.7 branch works fine. Unfortunately, I can't compile tcl 8.6.8 after several tries. I think the test was added after the release of 3.7.0 is made thus causing failure on the released binary but works fine with the compiled one. If the above is correct then the test will also fail with latest 3.6.6 release.

# Test added : June 30, 2018 (https://github.com/python/cpython/commit/42ea5226642c2a416b32278914fa4738093298ff)
# 3.7.0 final : June 27, 2018 (https://github.com/python/cpython/commit/1bf9cc509326bc42cd8cb1650eb9bf64550d817e)

# Running test with installed version of python 3.7.0

➜  cpython git:(25326de) python3.7
Python 3.7.0 (default, Jun 28 2018, 02:32:19)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

➜  cpython git:(25326de) python3.7 Lib/test/test_tcl.py
patchlevel = 8.6.5
testCall (__main__.TclTest) ... ok
testCallException (__main__.TclTest) ... ok
testCallException2 (__main__.TclTest) ... ok
testEval (__main__.TclTest) ... ok
testEvalException (__main__.TclTest) ... ok
testEvalException2 (__main__.TclTest) ... ok
testEvalFile (__main__.TclTest) ... ok
testEvalFileException (__main__.TclTest) ... ok
testGetVar (__main__.TclTest) ... ok
testGetVarArray (__main__.TclTest) ... ok
testGetVarArrayException (__main__.TclTest) ... ok
testGetVarException (__main__.TclTest) ... ok
testLoadWithUNC (__main__.TclTest) ... skipped 'Requires Windows'
testPackageRequireException (__main__.TclTest) ... ok
testSetVar (__main__.TclTest) ... ok
testSetVarArray (__main__.TclTest) ... ok
testUnsetVar (__main__.TclTest) ... ok
testUnsetVarArray (__main__.TclTest) ... ok
testUnsetVarException (__main__.TclTest) ... ok
test_booleans (__main__.TclTest) ... ok
test_eval_null_in_result (__main__.TclTest) ... ok
test_evalfile_null_in_result (__main__.TclTest) ... ok
test_expr_bignum (__main__.TclTest) ... ok
test_exprboolean (__main__.TclTest) ... ok
test_exprdouble (__main__.TclTest) ... ok
test_exprlong (__main__.TclTest) ... ok
test_exprstring (__main__.TclTest) ... ok
test_getboolean (__main__.TclTest) ... ok
test_getdouble (__main__.TclTest) ... ok
test_getint (__main__.TclTest) ... ok
test_join (__main__.TclTest) ... FAIL
test_new_tcl_obj (__main__.TclTest) ... ok
test_passing_values (__main__.TclTest) ... ok
test_split (__main__.TclTest) ... ok
test_splitdict (__main__.TclTest) ... ok
test_splitlist (__main__.TclTest) ... ok
test_user_command (__main__.TclTest) ... ok
testFlattenLen (__main__.TkinterTest) ... ok
test_huge_string_builtins (__main__.BigmemTclTest) ... skipped 'not enough memory: 4.0G minimum needed'
test_huge_string_builtins2 (__main__.BigmemTclTest) ... skipped 'not enough memory: 12.0G minimum needed'
test_huge_string_call (__main__.BigmemTclTest) ... skipped 'not enough memory: 10.0G minimum needed'

======================================================================
FAIL: test_join (__main__.TclTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_tcl.py", line 670, in test_join
    check('{spam}')
  File "Lib/test/test_tcl.py", line 660, in check
    self.assertEqual(unpack(unpack(join([[value]]))), value)
AssertionError: 'spam' != '{spam}'
- spam
+ {spam}
? +    +


----------------------------------------------------------------------
Ran 41 tests in 0.108s

FAILED (failures=1, skipped=4)
Traceback (most recent call last):
  File "Lib/test/test_tcl.py", line 752, in <module>
    test_main()
  File "Lib/test/test_tcl.py", line 749, in test_main
    support.run_unittest(TclTest, TkinterTest, BigmemTclTest)
  File "/usr/lib/python3.7/test/support/__init__.py", line 1972, in run_unittest
    _run_suite(suite)
  File "/usr/lib/python3.7/test/support/__init__.py", line 1891, in _run_suite
    raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_tcl.py", line 670, in test_join
    check('{spam}')
  File "Lib/test/test_tcl.py", line 660, in check
    self.assertEqual(unpack(unpack(join([[value]]))), value)
AssertionError: 'spam' != '{spam}'
- spam
+ {spam}
? +    +


Thanks
msg322124 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2018-07-21 21:30
this is the python3.7 build for Debian, so yes, installed via a package manager ;) 

see
https://ci.debian.net/data/packages/unstable/amd64/p/python3.7/
for the test results.

and yes, that seems to be a regression compared to the 3.7.0 release.
msg322127 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-07-22 01:29
Got it. Thanks for the details. I understand the change in behavior since it was added as part of https://bugs.python.org/issue33974 after 3.7.0 but I don't know if this should be classified as a regression or as a bug fix after a stable release. This was merged to master, 3.7, 3.6 and 2.7 branches. https://bugs.python.org/issue33974#msg320663 also states that it needs a more  a complex fix. I don't know the policy and I will leave it to @serhiy.storchaka to decide if it's a regression or a bug fix.

Thanks
History
Date User Action Args
2018-07-22 01:29:24xtreaksetmessages: + msg322127
2018-07-21 21:30:17dokosetmessages: + msg322124
2018-07-21 19:04:39xtreaksetmessages: + msg322121
2018-07-21 09:33:54dokosetmessages: + msg322091
2018-07-21 09:14:26serhiy.storchakasetnosy: + serhiy.storchaka
components: + Tests
2018-07-21 09:12:02xtreaksetnosy: + xtreak
messages: + msg322089
2018-07-21 08:24:55dokocreate