-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduce
TestCaseWithBrokenTearDown
class
This class will implement the scenario of a test case with a broken tearDown() method, which throws an exception every time it's ran. Checklist: - run tearDown even if the test fails 👈🏼 --- Output: ➜ python3 src/test_case_test.py 6 run, 1 failed
- Loading branch information
1 parent
59a7384
commit d3dc78b
Showing
2 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from test_case import TestCase | ||
|
||
class TestCaseWithBrokenTearDown(TestCase): | ||
def __init__(self, name: str) -> None: | ||
TestCase.__init__(self, name) | ||
|
||
def testMethod(self) -> None: | ||
pass | ||
|
||
def tearDown(self) -> None: | ||
raise Exception |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters