You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class TestBase:
def setup_method(self, method):
print("setting up class")
def teardown_method(self, method):
print("tearing down class")
With a base class above, I have createed a class called TestA inheritnig from TestBase & I have my test method written in the TestA class like below:
class TestA(TestBase):
def test_decorator(self):
A log file will be created after each test method finishes running.
How do I delete the log file if the test has failed or skipped in the teardown_method?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
With a base class above, I have createed a class called
TestA
inheritnig fromTestBase
& I have my test method written in theTestA
class like below:A log file will be created after each test method finishes running.
How do I delete the log file if the test has failed or skipped in the
teardown_method
?Thanks
Beta Was this translation helpful? Give feedback.
All reactions