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

add StartedTestStep type state #3

Merged
merged 1 commit into from
Oct 8, 2024
Merged

add StartedTestStep type state #3

merged 1 commit into from
Oct 8, 2024

Conversation

mimir-d
Copy link
Contributor

@mimir-d mimir-d commented Oct 4, 2024

- similar to #1, this type pattern disallows steps from doing invalid
  operations, like logging when the step hasnt started yet
- also same reasoning as in #1 around commenting out the `scope` method
  on TestStep

Signed-off-by: mimir-d <[email protected]>
@mimir-d mimir-d requested a review from njordr October 4, 2024 16:25
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.6%. Comparing base (0641915) to head (1772e2d).
Report is 1 commits behind head on dev.

Additional details and impacted files

}

// /// Builds a scope in the [`TestStep`] object, taking care of starting and
Copy link
Collaborator

Choose a reason for hiding this comment

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

why these comments here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

comment was above

also same reasoning as in #1 around commenting out the scope method on TestStep

im temporarily disabling those until im happy with a semantically correct solution for the scopes. Issue is that async impls cannot capture the lifetimes of things used inside them (current rust syntax limitation). I'm gonna re-enable them as boxed futures in a later PR, but gated behind a feature flag, so that people explicitly opt-in (until maybe we get the missing rust feature in the future)

tests/output/runner.rs Show resolved Hide resolved
@mimir-d mimir-d merged commit ea8a09c into dev Oct 8, 2024
12 checks passed
@mimir-d mimir-d deleted the fea/typestate_step branch October 8, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants