help - documentation improvement - grouping test by class - how to share values
See original GitHub issueFollowing this example https://docs.pytest.org/en/latest/getting-started.html#group-multiple-tests-in-a-class i would like to make a test workflow. the second test needs result obtained from the first test. i’m not able to share these information.
i’m using python 3.7.4 and pytest-5.2.1
as you can see,
even if i set a parameter to the class, this parameter look like already evaluated when the second test start.
import pytest
@pytest.mark.incremental
class TestUserHandling:
id = "1"
def test_login(self):
print("id value --> " + self.id)
self.id = "2"
print("id value --> " + self.id)
pass
def test_modification(self):
assert self.id == "2", "self id value is " + self.id
first test returns
b__test_step.py::TestUserHandling::test_login PASSED
id value --> 1
id value --> 2
second test returns
AssertionError: self id value is 1
1 != 2
second test needs data from the first test to make the job.
how can i obtain this behaviour?
thanks.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How can I assess group work? - Eberly Center
Assess individual, as well as group, learning and performance. ... they feel that their own success is dependent on team members who don't...
Read more >Instructional Grouping in the Classroom - Education Northwest
The team goal is to help one another complete assigned tasks successfully and to improve each student's performance on a quiz measuring skills...
Read more >Clinical Documentation Integrity Education & Training - AHIMA
Do you have data-driven best practices to share that elevate the health ... Certified Documentation Improvement Practitioner (CDIP) Exam Preparation.
Read more >What Is Clinical Documentation Improvement (CDI)? - AAPC
CDI (Clinical Documentation Improvement) is the process of improving medical record documentation for completeness, specifics, and accuracy.
Read more >How to Write Test Cases: The Ultimate Guide with Examples
How to Improve Test Case Efficiency. Document Collection for Test Writing; Real Example; Test Case Document; Test Data Collection.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
currently the setups im involved in do workflws&co by just setting up the dependencies for each test in fixtures, even if its expensive in some ways, and then use caching7scopes to sort out the cost
thanks for the follow-up