Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test.py --time throws TypeError: a float is required #20341

Closed
richardlau opened this issue Apr 26, 2018 · 1 comment
Closed

test.py --time throws TypeError: a float is required #20341

richardlau opened this issue Apr 26, 2018 · 1 comment
Labels
tools Issues and PRs related to the tools directory.

Comments

@richardlau
Copy link
Member

  • Version: master
  • Platform: Windows, Linux x64 (haven't tried others yet)
  • Subsystem: tools

I'm getting an error when using the --time option for test.py:
e.g.,

$ ./tools/test.py --time test/parallel/test-module-loading-globalpaths
[00:02|% 100|+   1|-   0]: Done
--- Total time: 00:02.244 ---
Traceback (most recent call last):
  File "./tools/test.py", line 1760, in <module>
    sys.exit(Main())
  File "./tools/test.py", line 1752, in Main
    t = FormatTime(entry.duration)
  File "./tools/test.py", line 1531, in FormatTime
    millis = round(d * 1000) % 1000
TypeError: a float is required
@richardlau richardlau added the tools Issues and PRs related to the tools directory. label Apr 26, 2018
@richardlau
Copy link
Member Author

Fix in #20368.

@trivikr trivikr closed this as completed in ab15198 May 3, 2018
MylesBorins pushed a commit that referenced this issue May 4, 2018
Calculated durations are timedelta objects but the FormatTime function
is expecting a number in seconds.

PR-URL: #20368
Fixes: #20341
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
MylesBorins pushed a commit that referenced this issue May 8, 2018
Calculated durations are timedelta objects but the FormatTime function
is expecting a number in seconds.

PR-URL: #20368
Fixes: #20341
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
MylesBorins pushed a commit that referenced this issue Aug 17, 2018
Calculated durations are timedelta objects but the FormatTime function
is expecting a number in seconds.

PR-URL: #20368
Fixes: #20341
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues and PRs related to the tools directory.
Projects
None yet
Development

No branches or pull requests

1 participant