Skip to content

time field has different precision depending on python version #88

@nicola-lunghi

Description

@nicola-lunghi

On this line:

test_suite_attributes["time"] = str(sum(c.elapsed_sec for c in self.test_cases if c.elapsed_sec))

and in this line:

test_case_attributes["time"] = "%f" % case.elapsed_sec

The precision is not specified so in different system I get different numbers.

See this issue on tap2junit project:

nodejs/tap2junit#62

-     <testsuite disabled="0" errors="1" failures="0" name="test/fixtures/test3" skipped="25" tests="2367" time="1.138146" hostname="{HOSTNAME}">
+     <testsuite disabled="0" errors="1" failures="0" name="test/fixtures/test3" skipped="25" tests="2367" time="1.1381459999999999" hostname="{HOSTNAME}">...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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