Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 #71500

Closed
ned-deily opened this issue Jun 14, 2016 · 18 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes tests Tests in the Lib/test dir topic-tkinter

Comments

@ned-deily
Copy link
Member

BPO 27313
Nosy @ned-deily, @ambv, @serhiy-storchaka, @miss-islington
PRs
  • bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk #12011
  • [3.7] bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12011) #12012
  • [3.6] bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12011) #12013
  • [2.7] bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk #12015
  • bpo-27313: Fix ttk_guionly tests failing on Framework builds on macOS #29411
  • [3.10] bpo-27313: Fix ttk_guionly tests failing on Framework builds on macOS (GH-29411) #29422
  • [3.9] bpo-27313: Fix ttk_guionly tests failing on Framework builds on macOS (GH-29411) #29423
  • bpo-45160: Use non-deprecated methods for tracing #29425
  • [3.10] bpo-27313: Use non-deprecated methods for tracing (GH-29425) #29450
  • [3.9] bpo-27313: Use non-deprecated methods for tracing (GH-29425) #29451
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-02-24.08:40:52.766>
    created_at = <Date 2016-06-14.01:06:19.947>
    labels = ['tests', '3.8', '3.7', 'expert-tkinter']
    title = 'test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18'
    updated_at = <Date 2021-11-06.19:23:32.253>
    user = 'https://github.com/ned-deily'

    bugs.python.org fields:

    activity = <Date 2021-11-06.19:23:32.253>
    actor = 'lukasz.langa'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-02-24.08:40:52.766>
    closer = 'ned.deily'
    components = ['Tests', 'Tkinter']
    creation = <Date 2016-06-14.01:06:19.947>
    creator = 'ned.deily'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 27313
    keywords = ['patch']
    message_count = 18.0
    messages = ['268494', '268513', '268515', '268520', '268531', '268535', '313016', '336443', '336444', '336445', '336449', '336450', '405771', '405776', '405777', '405879', '405882', '405883']
    nosy_count = 4.0
    nosy_names = ['ned.deily', 'lukasz.langa', 'serhiy.storchaka', 'miss-islington']
    pr_nums = ['12011', '12012', '12013', '12015', '29411', '29422', '29423', '29425', '29450', '29451']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue27313'
    versions = ['Python 2.7', 'Python 3.6', 'Python 3.7', 'Python 3.8']

    @ned-deily
    Copy link
    Member Author

    On 3.6.0a2, 3.5.2rc1, and 2.7.12rc1:

    ======================================================================
    FAIL: test_identify (tkinter.test.test_ttk.test_widgets.ComboboxTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/test/test_ttk/test_widgets.py", line 332, in test_identify
        self.assertEqual(self.entry.identify(5, 5), "textarea")
    AssertionError: 'Combobox.button' != 'textarea'
    - Combobox.button
    + textarea

    On 3.6.0a2 and 3.5.2rc1:

    ======================================================================
    FAIL: test_virtual_event (tkinter.test.test_ttk.test_widgets.ComboboxTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/test/test_ttk/test_widgets.py", line 455, in test_virtual_event
        self.assertTrue(success)
    AssertionError: [] is not true

    @ned-deily ned-deily added tests Tests in the Lib/test dir topic-tkinter labels Jun 14, 2016
    @serhiy-storchaka
    Copy link
    Member

    These tests are not new. Are failures stable? What version of Tk is used?

    @serhiy-storchaka
    Copy link
    Member

    Ah, sorry, I missed the version in the title.

    @ned-deily
    Copy link
    Member Author

    For example, the tests pass in 3.5.1 but fail in 3.5.2rc1. I see that the changesets associated with bpo-26177 altered them.

    @serhiy-storchaka
    Copy link
    Member

    Are there failures if run tests separately?

    $ ./python -m test -vu gui -m test_identify test_ttk_guionly

    If no, could you please find a test running before test_identify or test_virtual_event that provokes a failure?

    I can't reproduce failures on Linux. Needed help of Mac user for investigating this issue.

    @ned-deily
    Copy link
    Member Author

    test_ttk_guionly runs test_identify, doesn't it? (I'll try to take a look at it later when I have more time.)

    $ /usr/local/bin/python3.5 -m test -vu gui test_ttk_guionly
    == CPython 3.5.2rc1 (v3.5.2rc1:68feec6488b2, Jun 11 2016, 21:59:53) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
    ==   Darwin-15.5.0-x86_64-i386-64bit little-endian
    ==   hash algorithm: siphash24 64bit
    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)
    [1/1] test_ttk_guionly
    test_horizontal_range (tkinter.test.test_ttk.test_extensions.LabeledScaleTest) ... ok
    test_initialization (tkinter.test.test_ttk.test_extensions.LabeledScaleTest) ... ok
    test_initialization_no_master (tkinter.test.test_ttk.test_extensions.LabeledScaleTest) ... ok
    test_resize (tkinter.test.test_ttk.test_extensions.LabeledScaleTest) ... ok
    test_variable_change (tkinter.test.test_ttk.test_extensions.LabeledScaleTest) ... ok
    test_widget_destroy (tkinter.test.test_ttk.test_extensions.LabeledScaleTest) ... ok
    test_initialization (tkinter.test.test_ttk.test_extensions.OptionMenuTest) ... ok
    test_menu (tkinter.test.test_ttk.test_extensions.OptionMenuTest) ... ok
    test_widget_destroy (tkinter.test.test_ttk.test_extensions.OptionMenuTest) ... ok
    test_configure (tkinter.test.test_ttk.test_style.StyleTest) ... ok
    test_layout (tkinter.test.test_ttk.test_style.StyleTest) ... ok
    test_lookup (tkinter.test.test_ttk.test_style.StyleTest) ... ok
    test_map (tkinter.test.test_ttk.test_style.StyleTest) ... ok
    test_theme_use (tkinter.test.test_ttk.test_style.StyleTest) ... ok
    patchlevel = 8.5.18
    [...]
    test_foreground (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
    test_height (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
    test_identify (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... FAIL
    test_invalidcommand (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
    test_justify (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
    test_keys (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
    test_postcommand (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
    [...]
    test_validatecommand (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
    test_validation (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
    test_validation_options (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
    test_values (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
    test_virtual_event (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... FAIL
    test_width (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
    test_xscrollcommand (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
    test_background (tkinter.test.test_ttk.test_widgets.EntryTest) ... ok
    [...]
    test_identify (tkinter.test.test_ttk.test_widgets.WidgetTest) ... ok
    test_widget_state (tkinter.test.test_ttk.test_widgets.WidgetTest) ... ok

    ======================================================================
    FAIL: test_identify (tkinter.test.test_ttk.test_widgets.ComboboxTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tkinter/test/test_ttk/test_widgets.py", line 332, in test_identify
        self.assertEqual(self.entry.identify(5, 5), "textarea")
    AssertionError: 'Combobox.button' != 'textarea'
    - Combobox.button
    + textarea

    ======================================================================
    FAIL: test_virtual_event (tkinter.test.test_ttk.test_widgets.ComboboxTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tkinter/test/test_ttk/test_widgets.py", line 455, in test_virtual_event
        self.assertTrue(success)
    AssertionError: [] is not true

    Ran 271 tests in 3.242s

    FAILED (failures=2, skipped=11)
    test test_ttk_guionly failed
    1 test failed:
    test_ttk_guionly

    @ned-deily
    Copy link
    Member Author

    With a current Tk 8.6.8, test_virtual_event no longer fails (still does with 8.5.18) but test_identify still fails as it does with 8.5.

    @ned-deily ned-deily added 3.7 (EOL) end of life 3.8 only security fixes labels Feb 27, 2018
    @ned-deily
    Copy link
    Member Author

    New changeset aeca373 by Ned Deily in branch 'master':
    bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12011)
    aeca373

    @miss-islington
    Copy link
    Contributor

    New changeset 25d20a6 by Miss Islington (bot) in branch '3.7':
    bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12011)
    25d20a6

    @ned-deily
    Copy link
    Member Author

    New changeset 1dee456 by Ned Deily (Miss Islington (bot)) in branch '3.6':
    bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12011) (GH-12013)
    1dee456

    @ned-deily
    Copy link
    Member Author

    New changeset b5213f4 by Ned Deily in branch '2.7':
    [2.7] bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12015)
    b5213f4

    @ned-deily
    Copy link
    Member Author

    macOS Cocoa Tk returns an identity of 'Combobox.button' for the created Combobox widget at the tested location whereas the X-based Tk's (including the macOS X version) returns 'textarea'. Rather than try to further modify the test code, I just modified the test case to pass with either value when running on macOS.

    @ambv
    Copy link
    Contributor

    ambv commented Nov 5, 2021

    New changeset e52f9be by Łukasz Langa in branch 'main':
    bpo-27313: Fix ttk_guionly tests failing on Framework builds on macOS (GH-29411)
    e52f9be

    @ambv
    Copy link
    Contributor

    ambv commented Nov 5, 2021

    New changeset 363ecb3 by Miss Islington (bot) in branch '3.10':
    bpo-27313: Fix ttk_guionly tests failing on Framework builds on macOS (GH-29411) (GH-29422)
    363ecb3

    @ambv
    Copy link
    Contributor

    ambv commented Nov 5, 2021

    New changeset 885e57c by Miss Islington (bot) in branch '3.9':
    bpo-27313: Fix ttk_guionly tests failing on Framework builds on macOS (GH-29411) (GH-29423)
    885e57c

    @ambv
    Copy link
    Contributor

    ambv commented Nov 6, 2021

    New changeset cc1cbcb by Serhiy Storchaka in branch 'main':
    bpo-27313: Use non-deprecated methods for tracing (GH-29425)
    cc1cbcb

    @ambv
    Copy link
    Contributor

    ambv commented Nov 6, 2021

    New changeset 8fdf6c6 by Miss Islington (bot) in branch '3.10':
    bpo-27313: Use non-deprecated methods for tracing (GH-29425) (GH-29450)
    8fdf6c6

    @ambv
    Copy link
    Contributor

    ambv commented Nov 6, 2021

    New changeset 376218e by Miss Islington (bot) in branch '3.9':
    bpo-27313: Use non-deprecated methods for tracing (GH-29425) (GH-29451)
    376218e

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 only security fixes tests Tests in the Lib/test dir topic-tkinter
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants