GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add more tests for formatting floats and fractions · Issue #109546 · python/cpython

Add more tests for formatting floats and fractions #109546

New issue
Copy link
New issue
Copy link
Closed
Closed
Add more tests for formatting floats and fractions#109546
Copy link
Labels
3.12only security fixesonly security fixes3.13only security fixesonly security fixestestsTests in the Lib/test dirTests in the Lib/test dir

Description

@serhiy-storchaka
serhiy-storchaka
opened on Sep 18, 2023
Issue body actions

File "formatfloat_testcases.txt" contains test cases for testing printf-like formatting of floats. The same data can be used for testing new-style formatting of floats (they give the same result) and float-style formatting of Fraction (added in 3.12).

cc @mdickinson

Linked PRs

  • gh-109546: Add more tests for formatting floats and fractions #109548
  • [3.12] gh-109546: Add more tests for formatting floats and fractions (GH-109548) #109557
  • [3.11] gh-109546: Add more tests for formatting floats (GH-109548) #109685

Activity

  1. serhiy-storchaka
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    3.12only security fixesonly security fixes
    3.13only security fixesonly security fixes
    on Sep 18, 2023
  2. serhiy-storchaka
    added 2 commits that reference this issue on Sep 18, 2023

    pythongh-109546: Add more tests for formatting floats and fractions

    948747a

    gh-109546: Add more tests for formatting floats and fractions (GH-109548

    beb5ec5
  3. miss-islington
    added a commit that references this issue on Sep 19, 2023

    pythongh-109546: Add more tests for formatting floats and fractions (p…

    379f0a2
  4. vstinner
    closed this as completedon Sep 19, 2023
  5. serhiy-storchaka commented on Sep 19, 2023

    @serhiy-storchaka
    serhiy-storchaka
    on Sep 19, 2023
    MemberAuthor
    More actions

    I tried also to use this file in test_decimal, but decimals produce very different output.

    I am not sure about test_complex. On one hand, complex formatting uses the same PyOS_double_to_string() as float formatting. On other hand, there is a code between __format__() and PyOS_double_to_string() which can affect interpretation of the format string.

    Reacted by Victor Stinner
  6. vstinner commented on Sep 19, 2023

    @vstinner
    vstinner
    on Sep 19, 2023
    Member
    More actions

    It's already great to use it in test_fractions! And that you added more tests in test_float.

  7. vstinner
    added 2 commits that reference this issue on Sep 21, 2023

    pythongh-109546: Add more tests for formatting floats (pythonGH-109548)

    6f0c599

    [3.11] gh-109546: Add more tests for formatting floats (GH-109548) (#…

    84d8fdb
  8. csm10495
    added a commit that references this issue on Sep 28, 2023

    pythongh-109546: Add more tests for formatting floats and fractions (p…

    be83a3a
  9. Yhg1s
    added a commit that references this issue on Oct 2, 2023

    [3.12] gh-109546: Add more tests for formatting floats and fractions (G…

    acb6753
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixesonly security fixes3.13only security fixesonly security fixestestsTests in the Lib/test dirTests in the Lib/test dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.