Skip to content

Add timer to tests - #376

Merged
willGraham01 merged 5 commits into
mainfrom
add-timer-to-tests
Sep 18, 2025
Merged

Add timer to tests#376
willGraham01 merged 5 commits into
mainfrom
add-timer-to-tests

Conversation

@willGraham01

Copy link
Copy Markdown
Collaborator

Adds a timer to the system tests

Comment thread tdms/tests/system/run_system_test.py Outdated
@samcunliffe
samcunliffe requested a review from Copilot September 17, 2025 15:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds execution timing functionality to the system tests by tracking how long each test command takes to run and displaying the elapsed time to the user.

  • Replaces print statements with sys.stdout.write for output formatting
  • Implements timer logic using time.time() to measure test execution duration
  • Displays elapsed time in seconds after each test completes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread tdms/tests/system/run_system_test.py Outdated
Comment thread tdms/tests/system/run_system_test.py
Comment thread tdms/tests/system/run_system_test.py Outdated
@samcunliffe samcunliffe added testing Adding or requesting more test coverage housekeeping Code cleanup labels Sep 17, 2025

@samcunliffe samcunliffe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No output in logs 😞

@willGraham01

Copy link
Copy Markdown
Collaborator Author

@willGraham01
willGraham01 enabled auto-merge (squash) September 18, 2025 11:05

@samcunliffe samcunliffe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've still got too many sig. fig.s to my taste. And elapsed not ellapsed (annoyingly elipse ellipse is the other way around).

But now working 👍

Comment thread tdms/tests/system/read_config.py Outdated
willGraham01 and others added 2 commits September 18, 2025 12:10
Co-authored-by: Sam Cunliffe <samcunliffe@users.noreply.github.com>
@willGraham01
willGraham01 merged commit dff32f9 into main Sep 18, 2025
16 checks passed
@willGraham01
willGraham01 deleted the add-timer-to-tests branch September 18, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

housekeeping Code cleanup testing Adding or requesting more test coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants