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

Invoke tearDown() even if test fails #21

Merged
merged 2 commits into from
Mar 19, 2023

Conversation

kaiosilveira
Copy link
Owner

@kaiosilveira kaiosilveira commented Mar 19, 2023

Bonus: make sure tearDown() is called even if the test fails

Our goal in this PR was to make sure tearDown() is being called even if the test executed has failed. This behavior was actually already in place, so a test was added to make sure it remains working and a log entry was added to the call log so we can inspect the data in the correct order.

Closes #18

Checklist:
- run tearDown even if the test fails 👈🏼

---

Output:
➜ python3 src/test_case_test.py
7 run, 1 failed
Checklist:
- run tearDown even if the test fails ✅

---

Output:
➜ python3 src/test_case_test.py
7 run, 0 failed
@kaiosilveira kaiosilveira marked this pull request as ready for review March 19, 2023 10:23
@kaiosilveira kaiosilveira changed the title Run tearDown() even if test fails Invoke tearDown() even if test fails Mar 19, 2023
@kaiosilveira kaiosilveira merged commit f13f5f8 into main Mar 19, 2023
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.

Invoke teardown even if the test fails
1 participant