Closed
Description
I write a test class, it has two test methods. What I want to do is, at the first test I'd like to get some result and assign to a variable; and at the second test I want to do some test depend on this variable. What's the best way to do this? Currently, I use a "global", and I know I can put these two tests into a same method. But I look forward a better solution.
Thanks for submitting an issue!
Here's a quick checklist in what to include:
- Include a detailed description of the bug or suggestion
-
pip list
of the virtual environment you are using - pytest and operating system versions
- Minimal example if possible