j4321 / tkcalendar

Calendar widget for Tkinter
https://pypi.python.org/pypi/tkcalendar
GNU General Public License v3.0
97 stars 33 forks source link

Unit Tests issue Exceptions #108

Open photodude opened 8 months ago

photodude commented 8 months ago

Exceptions are observed in the Python 3.5 unit tests. Says all tests pass but exceptions exist possibly related to nose unit test issues #107

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\projects\tkcalendar\tkcalendar\calendar_.py", line 737, in _textvariable_trace self._sel_date = self.parse_date(date)
  File "C:\projects\tkcalendar\tkcalendar\calendar_.py", line 1223, in parse_date year = numbers[indexes['Y']]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "C:\PYTHON35\lib\tkinter\__init__.py", line 1558, in __call__ return self.func(*args)
  File "C:\projects\tkcalendar\tkcalendar\calendar_.py", line 743, in _textvariable_trace raise ValueError("%r is not a valid date." % date)
ValueError: 'a' is not a valid date.

exceptions in the 3.6 tests observed

......Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\projects\tkcalendar\tkcalendar\calendar_.py", line 737, in _textvariable_trace self._sel_date = self.parse_date(date)
  File "C:\projects\tkcalendar\tkcalendar\calendar_.py", line 1227, in parse_date year = numbers[indexes['Y']]
IndexError: list index out of range

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "C:\Python36\lib\tkinter\__init__.py", line 1705, in __call__ return self.func(*args)
  File "C:\projects\tkcalendar\tkcalendar\calendar_.py", line 743, in _textvariable_trace raise ValueError("%r is not a valid date." % date)
ValueError: 'a' is not a valid date.

........Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python36\lib\tkinter\__init__.py", line 1705, in __call__ return self.func(*args)
  File "C:\Python36\lib\tkinter\__init__.py", line 749, in callit func(*args)
TypeError: test_leave() missing 1 required positional argument: 'button'

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python36\lib\tkinter\__init__.py", line 1705, in __call__ return self.func(*args)
  File "C:\Python36\lib\tkinter\__init__.py", line 749, in callit func(*args)
  File "C:\projects\tkcalendar\tests\test_tooltip.py", line 83, in <lambda> self.window.after(11, lambda: test(b2))
  File "C:\projects\tkcalendar\tests\test_tooltip.py", line 78, in test self.window.after(5, self.assertEqual(tw.current_widget, button))
  File "C:\Python36\lib\unittest\case.py", line 829, in assertEqual assertion_func(first, second, msg=msg)
  File "C:\Python36\lib\unittest\case.py", line 822, in _baseAssertEqual raise self.failureException(msg)
AssertionError: <tkinter.ttk.Button object .!toplevel15.!button> != <tkinter.Button object .!toplevel15.!button2>

https://ci.appveyor.com/project/j4321/tkcalendar/builds/37283680/job/50oo0qwwrkgq5sg9