From 45bf53f376477a7312a63a8e02dbd5295e382aea Mon Sep 17 00:00:00 2001 From: "jai.s" Date: Thu, 15 Oct 2020 13:58:48 +0530 Subject: [PATCH] Added psutil.TimeoutExpired separately in tearDownClass method --- src/tests/test_process.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/tests/test_process.py b/src/tests/test_process.py index c2075e0b..f41e821a 100755 --- a/src/tests/test_process.py +++ b/src/tests/test_process.py @@ -98,11 +98,16 @@ class TestProcessProto(unittest.TestCase): print('6666666666666666666666666666') print('In the tearDownClass ,Process killied ?') print('666666666666666666666666666666') - except (psutil.NoSuchProcess, psutil.TimeoutExpired ,FileNotFoundError, AttributeError) as e: + except (psutil.NoSuchProcess, FileNotFoundError, AttributeError) as e: print('77777777777777777777777777') - print('In the tearDownClass ,after sending the kill process are not stopped') + print('In the tearDownClass ,psutil.NoSuchProcess,FileNotFoundError, AttributeError') + print(str(e)) print('77777777777777777777777777') - pass + except psutil.TimeoutExpired as e: + print('88888888888888888888888') + print('In the tearDownClass ,psutil.TimeoutExpired is occurred') + print(str(e)) + print('888888888888888888888888') finally: cls._cleanup_files()