Skip to content

Clarify the outcome of applying a timeLimit trait to a suite. #1225

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

Merged
merged 2 commits into from
Jul 16, 2025

Conversation

iamleeg
Copy link
Contributor

@iamleeg iamleeg commented Jul 15, 2025

Make it clearer that the time limit applies to each test or case in the suite, not to the overall runtime of the test suite.

Motivation:

I received feedback that a developer couldn't work out whether .timeLimit(_:) on a suite limits each test, or the whole suite.

Modifications:

  • Add documentation that explains that the time limit applies to each test or case in a parameterized test, when you apply it to a suite.
  • Remove some passive-voice sentences in the same documents so that it's clearer what a developer does, and what the testing library does for them.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

@iamleeg iamleeg changed the title rdar://140293091 Clarify the outcome of applying a timeLimit trait to a suite. Clarify the outcome of applying a timeLimit trait to a suite. Jul 15, 2025
@grynspan grynspan added bug 🪲 Something isn't working documentation 📚 Improvements or additions to documentation traits Issues and PRs related to the trait subsystem or built-in traits labels Jul 15, 2025
@grynspan grynspan added this to the Swift 6.x (main) milestone Jul 15, 2025
Copy link
Contributor

@stmontgomery stmontgomery left a comment

Choose a reason for hiding this comment

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

Thanks so much for this documentation polish! Left two comments but I leave it up to you whether those are actionable

@iamleeg iamleeg merged commit cfa0c09 into main Jul 16, 2025
@iamleeg iamleeg deleted the iamleeg/140293091-clarify-timeout-behavior branch July 16, 2025 10:42
iamleeg added a commit that referenced this pull request Jul 17, 2025
Make it clearer that the time limit applies to each test or case in the
suite, not to the overall runtime of the test suite.

### Motivation:

I received feedback that a developer couldn't work out whether
`.timeLimit(_:)` on a suite limits each test, or the whole suite.

### Modifications:

- Add documentation that explains that the time limit applies to each
test or case in a parameterized test, when you apply it to a suite.
- Remove some passive-voice sentences in the same documents so that it's
clearer what a developer does, and what the testing library does for
them.

### Checklist:

- [X] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [X] If public symbols are renamed or modified, DocC references should
be updated.
iamleeg added a commit that referenced this pull request Jul 17, 2025
…1225) (#1229)

- **Explanation**:
Update the documentation for the `timeLimit` trait to clarify that
applying the trait to a suite means that each test in that suite gets
the time limit.

- **Scope**:
Documentation changes only.

- **Issues**:

- **Original PRs**:
#1225

- **Risk**:
Documentation changes only, so very low risk.

- **Testing**:
N/A

- **Reviewers**:
@stmontgomery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working documentation 📚 Improvements or additions to documentation traits Issues and PRs related to the trait subsystem or built-in traits
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy