Skip to content

Increase test coverage for math.py fabs() function #149059

@manoj-km24

Description

@manoj-km24

In Lib/test/test_math.py, the testFabs() method tests integers but not infinity (especially negative infinity).

def testFabs(self):
        self.assertRaises(TypeError, math.fabs)
        self.ftest('fabs(-1)', math.fabs(-1), 1)
        self.ftest('fabs(0)', math.fabs(0), 0)
        self.ftest('fabs(1)', math.fabs(1), 1)

I have submitted a PR that increases test coverage for fabs().

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions