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

Is there a way to test a later code example that relies on an earlier one? #55

Open
robbie-portia opened this issue Feb 10, 2025 · 0 comments

Comments

@robbie-portia
Copy link

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")
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

No branches or pull requests

1 participant