Skip to content

test_tk test_widgets.ScaleTest fails with Tk 8.6.10 #85478

Closed

Description

@felixonmars
BPO 41306
Nosy @terryjreedy, @ned-deily, @ambv, @serhiy-storchaka, @felixonmars, @miss-islington, @E-Paine
PRs
  • bpo-41306: Allow scale value to not be rounded #21715
  • [3.8] bpo-41306: Allow scale value to not be rounded (GH-21715) #22596
  • [3.9] bpo-41306: Allow scale value to not be rounded (GH-21715) #22597
  • 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 2020-10-08.17:16:27.973>
    created_at = <Date 2020-07-15.19:12:33.815>
    labels = ['tests', '3.8', 'expert-tkinter', '3.9', '3.10']
    title = 'test_tk test_widgets.ScaleTest fails with Tk 8.6.10'
    updated_at = <Date 2020-10-08.17:16:27.972>
    user = 'https://github.com/felixonmars'

    bugs.python.org fields:

    activity = <Date 2020-10-08.17:16:27.972>
    actor = 'pablogsal'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-10-08.17:16:27.973>
    closer = 'pablogsal'
    components = ['Tests', 'Tkinter']
    creation = <Date 2020-07-15.19:12:33.815>
    creator = 'felixonmars'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 41306
    keywords = ['patch']
    message_count = 11.0
    messages = ['373710', '373767', '373768', '373780', '374531', '374733', '374741', '377509', '378250', '378254', '378257']
    nosy_count = 8.0
    nosy_names = ['terry.reedy', 'gpolo', 'ned.deily', 'lukasz.langa', 'serhiy.storchaka', 'felixonmars', 'miss-islington', 'epaine']
    pr_nums = ['21715', '22596', '22597']
    priority = 'critical'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue41306'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    Activity

    1. felixonmars commented on Jul 15, 2020

      felixonmarsmannequin
      MannequinAuthor

      test_from (tkinter.test.test_tkinter.test_widgets.ScaleTest) is currently failing on Arch Linux, and at least another place: https://python-build-standalone.readthedocs.io/en/latest/status.html

      The error looks like:

      ======================================================================
      FAIL: test_from (tkinter.test.test_tkinter.test_widgets.ScaleTest)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/usr/lib/python3.8/tkinter/test/test_tkinter/test_widgets.py", line 939, in test_from
          self.checkFloatParam(widget, 'from', 100, 14.9, 15.1, conv=float_round)
        File "/usr/lib/python3.8/tkinter/test/widget_tests.py", line 106, in checkFloatParam
          self.checkParam(widget, name, value, conv=conv, **kwargs)
        File "/usr/lib/python3.8/tkinter/test/widget_tests.py", line 64, in checkParam
          self.assertEqual2(widget.cget(name), expected, eq=eq)
        File "/usr/lib/python3.8/tkinter/test/widget_tests.py", line 47, in assertEqual2
          self.assertEqual(actual, expected, msg)
      AssertionError: 14.9 != 15.0

      It's the only failure in the current Python 3.8.4 release's test suite here. Also adding Python 3.9 and 3.10 as I am able to reproduce it on master too.

    2. ned-deily commented on Jul 16, 2020

      @ned-deily
      Member

      What version of Tk is being used? It's in the output from:
      python3 -m test.pythoninfo
      or however you invoke python.

    3. felixonmars commented on Jul 16, 2020

      felixonmarsmannequin
      MannequinAuthor

      tkinter.TCL_VERSION: 8.6
      tkinter.TK_VERSION: 8.6
      tkinter.info_patchlevel: 8.6.10

      It's always reproducible in either a real desktop or Xvfb with arbitrary resolution etc as far as I have tested.

    4. ned-deily commented on Jul 16, 2020

      @ned-deily
      Member

      I can reproduce that test failure with Tk 8.6.10 on macOS, along with a few others. I believe various small things have changed in Tk somewhere between 8.6.8 and 8.6.10 in ways that affect some of the Python Tk gui tests, like test_tk and test_ttk_guionly. Some of our tests are pretty brittle with regard to Tk behavior; they captured how a particular version of Tk worked without necessarily a guarantee on the Tk side that the observed behavior wouldn't change. Someone needs to go through and make the tests work with all recent versions of Tk 8.6.x and someone should also get at least some buildbots running with 8.6.10 and really running the gui tests.

    5. changed the title [-]test_tk failure on Arch Linux[/-] [+]test_tk test_widgets.ScaleTest fails with Tk 8.6.10[/+] on Jul 16, 2020
    6. changed the title [-]test_tk failure on Arch Linux[/-] [+]test_tk test_widgets.ScaleTest fails with Tk 8.6.10[/+] on Jul 16, 2020
    7. ned-deily commented on Jul 28, 2020

      @ned-deily
      Member

      This issue should be fixed for upcoming releases. Nosying Łukasz for consideration of "release blocker" status.

    8. E-Paine commented on Aug 3, 2020

      E-Painemannequin
      Mannequin

      +1 this issue. I have encountered this problem lots when testing patches and almost always just end up deleting the test_from method to get test_tk to pass. I am not sure of a solution, though, as we *need* to keep test compatibility with Tk 8.6.8 while (preferably) being able to recognise when the value is wrong for the given version. I hope to take a more in-depth look at the problem and possible solutions (I want to avoid, if possible, either checking the Tk version or allowing both 14.9 & 15.0 values to pass the test).

    9. E-Paine commented on Aug 3, 2020

      E-Painemannequin
      Mannequin

      For reference, I have opened https://core.tcl-lang.org/tk/tktview?name=81c3ef93148d17ff280d9a0b4c4edfce453b972f to report this to the Tk team and ask if this change in behaviour is intended.

    10. terryjreedy commented on Sep 25, 2020

      @terryjreedy
      Member

      Fixing this test bug is required to upgrade tk on Windows. bpo-39107 and PR 22405.

      E. Paine reported on the PR 21715 that this change is intentional and here to stay. I wondered the same; thank you for asking.

    11. miss-islington commented on Oct 8, 2020

      @miss-islington
      Contributor

      New changeset aecf036 by E-Paine in branch 'master':
      bpo-41306: Allow scale value to not be rounded (GH-21715)
      aecf036

    12. miss-islington commented on Oct 8, 2020

      @miss-islington
      Contributor

      New changeset 3d103e0 by Miss Skeleton (bot) in branch '3.8':
      bpo-41306: Allow scale value to not be rounded (GH-21715)
      3d103e0

    13. miss-islington commented on Oct 8, 2020

      @miss-islington
      Contributor

      New changeset 15e091f by Miss Skeleton (bot) in branch '3.9':
      bpo-41306: Allow scale value to not be rounded (GH-21715)
      15e091f

    14. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions