Linux users: please run gui tests
Peter Otten
__peter__ at web.de
Fri Aug 7 15:13:02 EDT 2015
Laura Creighton wrote:
> In a message of Fri, 07 Aug 2015 17:34:54 +0200, Peter Otten writes:
>>Run
>>
>>$ python3 -m test -ugui -v test_tk
>>
>>(That way the unittest framework will see the -v option)
>
> Aha, I didn't understand that. Thank you.
>
>>Note that there are lines like
>>
>># possible namespace for /home/lac/src/accounting/test
>>
>>in your python3 -v output that indicate that there may still be too much
>>in your PYTHONPATH.
>
> It's now "" for this test.
>
> I get 3 failures, as follows (I trimmed the rest of the ok ones).
>
> = CPython 3.4.3+ (default, Jul 28 2015, 13:17:50) [GCC 4.9.3]
> == Linux-3.16.0-4-amd64-x86_64-with-debian-stretch-sid little-endian
> == hash algorithm: siphash24 64bit
> == /tmp/test_python_7974
> Testing with flags: sys.flags(debug=0, inspect=0, interactive=0,
> optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0,
> ignore_environment=0, verbose=0, bytes_warning=0, quiet=0,
> hash_randomization=1, isolated=0)
>
> test_default (tkinter.test.test_tkinter.test_variables.TestBooleanVar) ...
> FAIL test_get (tkinter.test.test_tkinter.test_variables.TestBooleanVar)
> ... FAIL test_set
> (tkinter.test.test_tkinter.test_variables.TestBooleanVar) ... FAIL
>
> ======================================================================
> FAIL: test_default
> (tkinter.test.test_tkinter.test_variables.TestBooleanVar)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_variables.py",
> line 163, in test_default
> self.assertIs(v.get(), False)
> AssertionError: 0 is not False
>
> ======================================================================
> FAIL: test_get (tkinter.test.test_tkinter.test_variables.TestBooleanVar)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_variables.py",
> line 167, in test_get
> self.assertIs(v.get(), True)
> AssertionError: 1 is not True
>
> ======================================================================
> FAIL: test_set (tkinter.test.test_tkinter.test_variables.TestBooleanVar)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_variables.py",
> line 186, in test_set
> self.assertEqual(self.root.globalgetvar("name"), true)
> AssertionError: 42 != 1
>
> ----------------------------------------------------------------------
> Ran 660 tests in 3.901s
>
> FAILED (failures=3)
> 1 test failed:
> test_tk
test_set() was introduced in a bugfix
http://bugs.python.org/issue15133
https://hg.python.org/cpython/rev/117f45749359/
that I don't have on my machine (up-to-date Linux Mint 17). When I download
https://hg.python.org/cpython/file/117f45749359/Lib/tkinter/test/test_tkinter/test_variables.py
and manually run that file I get errors similar to those you are reporting:
$ python3 test_variables.py | grep -v ok$
test_default (__main__.TestBooleanVar) ... FAIL
test_get (__main__.TestBooleanVar) ... FAIL
test_invalid_value_domain (__main__.TestBooleanVar) ... FAIL
test_set (__main__.TestBooleanVar) ... FAIL
======================================================================
FAIL: test_default (__main__.TestBooleanVar)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_variables.py", line 163, in test_default
self.assertIs(v.get(), False)
AssertionError: 0 is not False
======================================================================
FAIL: test_get (__main__.TestBooleanVar)
Traceback (most recent call last):
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_variables.py", line 167, in test_get
self.assertIs(v.get(), True)
AssertionError: 1 is not True
======================================================================
File "test_variables.py", line 212, in <module>
FAIL: test_invalid_value_domain (__main__.TestBooleanVar)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_variables.py", line 196, in test_invalid_value_domain
v.set("value")
AssertionError: TclError not raised
======================================================================
FAIL: test_set (__main__.TestBooleanVar)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_variables.py", line 184, in test_set
self.assertEqual(self.root.globalgetvar("name"), false)
AssertionError: '0' != 0
----------------------------------------------------------------------
Ran 22 tests in 0.098s
FAILED (failures=4)
run_unittest(*tests_gui)
File "/usr/lib/python3.4/test/support/__init__.py", line 1719, in
run_unittest
_run_suite(suite)
File "/usr/lib/python3.4/test/support/__init__.py", line 1694, in
_run_suite
raise TestFailed(err)
test.support.TestFailed: multiple errors occurred
$
This leads me to believe that your tests and the tkinter shared library may
not match. Does
$ python3 -c 'import _tkinter; print(_tkinter)'
<module '_tkinter' from '/usr/lib/python3.4/lib-
dynload/_tkinter.cpython-34m-x86_64-linux-gnu.so'>
show something suspicious?
More information about the Python-list
mailing list