| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2a6c23e commit 03b6650
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -69,7 +69,7 @@ def get_module(name, path): | |||
| 69 | 69 | ||
| 70 | 70 | from io import open | |
| 71 | 71 | from os.path import join, dirname, abspath, basename, isdir, exists | |
| 72 | - from datetime import datetime | ||
| 72 | + from datetime import datetime, timedelta | ||
| 73 | 73 | try: | |
| 74 | 74 | from queue import Queue, Empty # Python 3 | |
| 75 | 75 | except ImportError: | |
@@ -400,16 +400,8 @@ def HasRun(self, output): | |||
| 400 | 400 | ||
| 401 | 401 | ||
| 402 | 402 | duration = output.test.duration | |
| 403 | - | ||
| 404 | - # total_seconds() was added in 2.7 | ||
| 405 | - total_seconds = (duration.microseconds + | ||
| 406 | - (duration.seconds + duration.days * 24 * 3600) * 10**6) / 10**6 | ||
| 407 | - | ||
| 408 | - # duration_ms is measured in seconds and is read as such by TAP parsers. | ||
| 409 | - # It should read as "duration including ms" rather than "duration in ms" | ||
| 410 | 403 | logger.info(' ---') | |
| 411 | - logger.info(' duration_ms: %d.%d' % | ||
| 412 | - (total_seconds, duration.microseconds / 1000)) | ||
| 404 | + logger.info(' duration_ms: %.5f' % (duration / timedelta(milliseconds=1))) | ||
| 413 | 405 | if self.severity != 'ok' or self.traceback != '': | |
| 414 | 406 | if output.HasTimedOut(): | |
| 415 | 407 | self.traceback = 'timeout\n' + output.output.stdout + output.output.stderr | |
| Back | FazBrowse Home | New Git URL |
0 commit comments