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

Updated documentation on using fixtures #98

Merged
merged 2 commits into from
Apr 8, 2019

Conversation

pydolan
Copy link
Contributor

@pydolan pydolan commented Apr 7, 2019

This fixes #91: I included details of how context.fixtures do not automatically reset between features/scenarios, and then described how using the fixture decorator on a step causes the fixture to load on all other steps that it shares a scenario with.

docs/usage.rst Outdated
a convenient way to keep fixtures close to your steps.
a convenient way to keep fixtures close to your steps. **Caveat:** if *any* step
in a scenario uses the fixture decorator, **all** steps in the scenario will
have the fixture loaded.
Copy link
Member

Choose a reason for hiding this comment

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

This sounds scary, but isn't this actually somewhat "normal"? What would a "confusing" situation look like?

Hence, do you think that deserves the tone of warning?

Maybe a dedicated "Note" paragraph or box explaining the technical reason, saying, "Just keep in mind ..." (like above) would do the job?

Copy link
Member

Choose a reason for hiding this comment

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

In any case, let's stick to semantic markup and text structure:

  • The warning is separate unit of information
  • It should probably come after the code sample (i.e. first motivate, show, then warn)
  • The caveat paragraph should probably be marked up as admonition

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update pushed. See if that is better

docs/usage.rst Show resolved Hide resolved
@bittner bittner merged commit 300ba12 into behave:master Apr 8, 2019
@bittner
Copy link
Member

bittner commented Apr 8, 2019

Thank you for updating the documentation! 👍 🥇

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.

Update documentation with minor detail about the fixtures decorator
2 participants