The ComboBox_test.py tests in Pmw 2.0.0 run under python 3.4.3 produces the following errors...
('====', 'function curselection ()')
==== result was:
((0,), <class 'tuple'="">)
---- result should have been:
(('0',), <class 'tuple'="">)
---- FAILED
('====', 'function curselection ()')
==== result was:
((5,), <class 'tuple'="">)
---- result should have been:
(('5',), <class 'tuple'="">)
---- FAILED
('====', 'function curselection ()')
==== result was:
((0,), <class 'tuple'="">)
---- result should have been:
(('0',), <class 'tuple'="">)
---- FAILED
('====', 'function curselection ()')
==== result was:
((5,), <class 'tuple'="">)
---- result should have been:
(('5',), <class 'tuple'="">)
---- FAILED
The Counter_test.py tests produce the following failures under python 3.4.3...
('====', "Counter option ('entryfield_validate', {'validator': 'date', 'format': 'dmy'})")
==== result was:
("TypeError: datevalidator() got an unexpected keyword argument 'format'", <class 'str'="">)
---- result should have been:
({'validator': 'date', 'format': 'dmy'}, <class 'dict'="">)
---- FAILED
('====', "function setentry ('22/12/1999',)")
==== result was:
(False, <class 'bool'="">)
---- result should have been:
(1, <class 'int'="">)
---- FAILED
('====', 'function get ()')
==== result was:
('22/12/1999', <class 'str'="">)
---- result should have been:
('01/01/2000', <class 'str'="">)
---- FAILED
('====', "Counter option ('entryfield_validate', {'validator': 'date', 'format': 'dmy'})")
==== result was:
("TypeError: datevalidator() got an unexpected keyword argument 'format'", <class 'str'="">)
---- result should have been:
({'validator': 'date', 'format': 'dmy'}, <class 'dict'="">)
---- FAILED
('====', 'function valid ()')
==== result was:
(True, <class 'bool'="">)
---- result should have been:
(0, <class 'int'="">)
---- FAILED
('====', 'function decrement ()')
==== result was:
("TypeError: datevalidator() got an unexpected keyword argument 'format'", <class 'str'="">)
---- result should have been:
(None, <class 'NoneType'="">)
---- FAILED
('====', 'function get ()')
==== result was:
('23/12/99', <class 'str'="">)
---- result should have been:
('24/12/99', <class 'str'="">)
---- FAILED
('====', "Counter option ('entryfield_validate', {'separator': '-', 'validator': 'date', 'format': 'ymd'})")
==== result was:
("TypeError: datevalidator() got an unexpected keyword argument 'format'", <class 'str'="">)
---- result should have been:
({'separator': '-', 'validator': 'date', 'format': 'ymd'}, <class 'dict'="">)
---- FAILED
('====', 'function valid ()')
==== result was:
(True, <class 'bool'="">)
---- result should have been:
(0, <class 'int'="">)
---- FAILED
('====', 'function increment ()')
==== result was:
("TypeError: datevalidator() got an unexpected keyword argument 'format'", <class 'str'="">)
---- result should have been:
(None, <class 'NoneType'="">)
---- FAILED
('====', 'function get ()')
==== result was:
('2000-01-11', <class 'str'="">)
---- result should have been:
('2000-01-01', <class 'str'="">)
---- FAILED
The ManualTests.py tests under python 3.4.3 fail with the error...
Traceback (most recent call last):
File "ManualTests.py", line 1, in <module>
Non
NameError: name 'Non' is not defined
The Test.py tests under python 3.4.3 fails with the error...
Traceback (most recent call last):
File "Test.py", line 19, in <module>
script_name = imp.find_module(name)[1]
File "/sw/lib/python3.4/imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'main'
The Tkinter_test.py tests under python 3.4.3 fail with the errors...
('====', 'function num_options (<tkinter.Button object="" at="" 0x1104e2160="">,)')
==== result was:
(35, <class 'int'="">)
---- result should have been:
(31, <class 'int'="">)
---- FAILED
('====', 'function invoke ()')
==== result was:
(1, <class 'int'="">)
---- result should have been:
('1', <class 'str'="">)
---- FAILED
('====', 'function num_options (<tkinter.Canvas object="" at="" 0x1104e2ac8="">,)')
==== result was:
(29, <class 'int'="">)
---- result should have been:
(27, <class 'int'="">)
---- FAILED
('====', "function tag_bind ('circle', '<1>', <function callback="" at="" 0x1104bf1e0="">)")
==== result was:
('4557775432callback', <class 'str'="">)
---- result should have been:
(None, <class 'NoneType'="">)
---- FAILED
('====', "function tag_bind ('circle',)")
==== result was:
(('<Button-1>',), <class 'tuple'="">)
---- result should have been:
('<Button-1>', <class 'str'="">)
---- FAILED
('====', 'function num_options (<tkinter.Checkbutton object="" at="" 0x1104e2ba8="">,)')
==== result was:
(41, <class 'int'="">)
---- result should have been:
(36, <class 'int'="">)
---- FAILED
('====', 'function invoke ()')
==== result was:
(1, <class 'int'="">)
---- result should have been:
('1', <class 'str'="">)
---- FAILED
('====', 'function num_options (<tkinter.Entry object="" at="" 0x1104e2940="">,)')
==== result was:
(36, <class 'int'="">)
---- result should have been:
(28, <class 'int'="">)
---- FAILED
('====', 'type', 'widget', "'colormap'", 'option')
---- could not set option
---- FAILED
('====', 'type', 'widget', "'visual'", 'option')
---- could not set option
---- FAILED
('====', 'function num_options (<tkinter.Frame object="" at="" 0x1104e2a58="">,)')
==== result was:
(18, <class 'int'="">)
---- result should have been:
(16, <class 'int'="">)
---- FAILED
('====', 'function num_options (<tkinter.Label object="" at="" 0x1104e26a0="">,)')
==== result was:
(30, <class 'int'="">)
---- result should have been:
(25, <class 'int'="">)
---- FAILED
('====', 'function num_options (<tkinter.Listbox object="" at="" 0x1104e2a58="">,)')
==== result was:
(27, <class 'int'="">)
---- result should have been:
(23, <class 'int'="">)
---- FAILED
('====', 'function curselection ()')
==== result was:
((2, 3), <class 'tuple'="">)
---- result should have been:
(('2', '3'), <class 'tuple'="">)
---- FAILED
('====', "Menu option ('background', 'lightsteelblue1')")
==== result was:
(<border object:="" 'lightsteelblue1'="">, <class '_tkinter.Tcl_Obj'="">)
---- result should have been:
('lightsteelblue1', <class 'str'="">)
---- FAILED
('====', "Menu option ('foreground', 'seagreen4')")
==== result was:
(<color object:="" 'seagreen4'="">, <class '_tkinter.Tcl_Obj'="">)
---- result should have been:
('seagreen4', <class 'str'="">)
---- FAILED
('====', "function entrycget ('Hello World', 'background')")
==== result was:
(<border object:="" 'aliceblue'="">, <class '_tkinter.Tcl_Obj'="">)
---- result should have been:
('aliceblue', <class 'str'="">)
---- FAILED
('====', "function invoke ('Niceness',)")
==== result was:
(1, <class 'int'="">)
---- result should have been:
('1', <class 'str'="">)
---- FAILED
('====', "function yposition ('Hello World',)")
==== result was:
(1, <class 'int'="">)
---- result should have been:
(2, <class 'int'="">)
---- FAILED
('====', 'function num_options (<tkinter.Menubutton object="" at="" 0x1104e2320="">,)')
==== result was:
(33, <class 'int'="">)
---- result should have been:
(32, <class 'int'="">)
---- FAILED
('====', 'function num_options (<tkinter.Radiobutton object="" at="" 0x1104e28d0="">,)')
==== result was:
(40, <class 'int'="">)
---- result should have been:
(35, <class 'int'="">)
---- FAILED
('====', 'function invoke ()')
==== result was:
(1, <class 'int'="">)
---- result should have been:
('1', <class 'str'="">)
---- FAILED
('====', "Scale option ('variable', <tkinter.DoubleVar object="" at="" 0x10fc8f780="">)")
==== result was:
(<parsedVarName object:="" 'PY_VAR1'="">, <class '_tkinter.Tcl_Obj'="">)
---- result should have been:
(<tkinter.DoubleVar object="" at="" 0x10fc8f780="">, <class 'tkinter.DoubleVar'="">)
---- FAILED
('====', 'function get (123,)')
==== result was:
('TypeError: get() takes 1 positional argument but 2 were given', <class 'str'="">)
---- result should have been:
('TypeError: too many arguments; expected 1, got 2', <class 'str'="">)
---- FAILED
('====', 'function num_options (<tkinter.Text object="" at="" 0x1104e2d68="">,)')
==== result was:
(44, <class 'int'="">)
---- result should have been:
(35, <class 'int'="">)
---- FAILED
('====', 'function mark_names ()')
==== result was:
(('insert', 'current', 'my_mark'), <class 'tuple'="">)
---- result should have been:
(('my_mark', 'insert', 'current'), <class 'tuple'="">)
---- FAILED
('====', "function tag_ranges ('green',)")
==== result was:
((<textindex object:="" '1.0'="">, <textindex object:="" '1.4'="">, <textindex object:="" '2.0'="">, <textindex object:="" '2.30'="">), <class 'tuple'="">)
---- result should have been:
(('1.0', '1.4', '2.0', '2.30'), <class 'tuple'="">)
---- FAILED
('====', "function tag_ranges ('green',)")
==== result was:
((<textindex object:="" '2.0'="">, <textindex object:="" '2.30'="">), <class 'tuple'="">)
---- result should have been:
(('2.0', '2.30'), <class 'tuple'="">)
---- FAILED
('====', 'type', 'widget', "'colormap'", 'option')
---- could not set option
---- FAILED
('====', 'type', 'widget', "'visual'", 'option')
---- could not set option
---- FAILED
('====', 'function grid_columnconfigure (0,)')
==== result was:
({'uniform': None, 'weight': 1, 'pad': 25, 'minsize': 100}, <class 'dict'="">)
---- result should have been:
({'weight': 1, 'pad': 25, 'minsize': 100}, <class 'dict'="">)
---- FAILED
TypeError Exception in Tk callback
Function: <function Misc.after.<locals="">.callit at 0x1104df840> (type: <class 'function'="">)
Args: ()
Traceback (innermost last):
File "/sw/lib/python3.4/site-packages/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 1760, in call
return self.func(args)
File "/sw/lib/python3.4/tkinter/init.py", line 582, in callit
func(args)
File "/sw/lib/python3.4/site-packages/Pmw/Pmw_2_0_0/tests/Test.py", line 483, in _runTest
_methodTest(w, methodTestData)
File "/sw/lib/python3.4/site-packages/Pmw/Pmw_2_0_0/tests/Test.py", line 563, in _methodTest
_print_results(result, expected, name)
File "/sw/lib/python3.4/site-packages/Pmw/Pmw_2_0_0/tests/Test.py", line 198, in _print_results
ok = (int(result) == expected)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
These seem to be side-effects of the switch to Tkinter 8.6 made in Python 3.4; I'll adapt the tests to use the correct values according to the Tkinter version since adapting Pmw to generate 8.5-compatible values seems to require a lot of code rewrite.
Tkinter_test is very old and is skipped by default in all.py; the comments inside it claim it's been disabled since the time of Win '95 so I'll postpone fixing it.
Manual tests suffered a porting error from 2 to 3, its contents went missing.
Test.py should be imported and not called directly; it works in that scenario; I don't fully understand why it broke after Python 3.2 but it's not vital.
Counter & ComboBox tests should now be functional.
All changes committed to: https://sourceforge.net/p/pmw/hg/ci/48399a529da1874f0310201cfc3015b951eacd32/
Fixed in 2.0.1-alpha