pydantic / pydantic/pytest-examples
Is there a way to test a later code example that relies on an earlier one?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 178
- Forks
- 25
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 7
Description
This is an awesome library - thanks for creating and maintaining it!
If I have a markdown doc that has 2 code snippets, is there any way to mark that the second one relies on the first one and therefore, in order to test the second example you need to take the code from the first example too?
E.g. test.md
You can import environment variables like this:
import os
s.environ.get("MY_ENV_VAR")
And you can also specify a default value:
s.environ.get("MY_ENV_VAR", "default")
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the plugin's markdown example extraction and execution flow, then check how independently tested snippets are represented. Define how a later snippet can declare dependence on an earlier one, and add coverage showing that the earlier code is included when the later example is tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100