How to interrupt or stop test when excuting TestCase.run? I tried result.stop(), stopTest(), stopTestRun() and self.fail(), but test is still running.
This is my log.
2024-05-24 14:37:46,833 - INFO - Test1
2024-05-24 14:37:46,835 - INFO - setup test
2024-05-24 14:37:46,841 - INFO - 0
2024-05-24 14:37:46,844 - INFO - test1
2024-05-24 14:37:47,477 - ERROR - Traceback (most recent call last):
File "/home/wade/PycharmProjects/test2-pyside6/test_util/ui.py", line 162, in <lambda>
self.pushButton_2.clicked.connect(lambda: TP.StopTest())
File "/home/wade/PycharmProjects/test2-pyside6/test_util/test_process.py", line 222, in StopTest
self.test_item.Stop()
File "/home/wade/PycharmProjects/test2-pyside6/test_util/test_case.py", line 29, in Stop
self.fail('Stop Test!!!!')
File "/usr/lib/python3.10/unittest/case.py", line 675, in fail
raise self.failureException(msg)
AssertionError: Stop Test!!!!
NoneType: None
2024-05-24 14:37:47,845 - INFO - 1
2024-05-24 14:37:47,848 - INFO - test1
2024-05-24 14:37:48,849 - INFO - 2
2024-05-24 14:37:48,851 - INFO - test1
2024-05-24 14:37:49,853 - INFO - 3
2024-05-24 14:37:49,854 - INFO - test1
2024-05-24 14:37:50,855 - INFO - 4
2024-05-24 14:37:50,858 - INFO - test1
Does anyone have any ideas?
New contributor
Wade is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.