Skip to content

Increase test coverage for string formatting #151162

@manoj-marimuthu

Description

@manoj-marimuthu

In Lib/test/test_str.py, string formatting is tested for nan and inf but not for -inf. -inf could be the most important among them (since we have to check if '-' formats correctly).

current test cases:

self.assertEqual('%f' % NAN, 'nan')
self.assertEqual('%F' % NAN, 'NAN')
self.assertEqual('%f' % INF, 'inf')
self.assertEqual('%F' % INF, 'INF')
self.assertEqual('%f' % -INF, '-inf')
self.assertEqual('%F' % -INF, '-INF')

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-featureA feature request or enhancement
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions