diff options
author | Hansen, Tony (th1395) <th1395@att.com> | 2021-12-01 22:01:56 +0000 |
---|---|---|
committer | Hansen, Tony (th1395) <th1395@att.com> | 2021-12-02 19:58:31 +0000 |
commit | 2108563705a2ec8bb80029d36122c69fa4d06df5 (patch) | |
tree | 1453b42bc3535635b136d0963a290243e26ae35f /tests/test_trapd_exit.py | |
parent | 8d7c0201456b7f9af6e91fea90354f4c3de323fe (diff) |
run the black formatting tool on python code
also fix up some copyright & license block lines
Change-Id: Ifb628e2ef1e5f13fed0a29964eec387d3982d605
Signed-off-by: Hansen, Tony (th1395) <th1395@att.com>
Issue-ID: DCAEGEN2-2995
Signed-off-by: Hansen, Tony (th1395) <th1395@att.com>
Diffstat (limited to 'tests/test_trapd_exit.py')
-rw-r--r-- | tests/test_trapd_exit.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/test_trapd_exit.py b/tests/test_trapd_exit.py index 35b7111..8803b29 100644 --- a/tests/test_trapd_exit.py +++ b/tests/test_trapd_exit.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= -# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved. # Copyright (c) 2019 Pantheon.tech. All rights reserved. -# Copyright 2021 Fujitsu Ltd. +# Copyright (c) 2021 Fujitsu Ltd. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,8 +20,9 @@ import pytest import unittest from miss_htbt_service.mod import trapd_exit -pid_file="/tmp/test_pid_file" -pid_file_dne="/tmp/test_pid_file_NOT" +pid_file = "/tmp/test_pid_file" +pid_file_dne = "/tmp/test_pid_file_NOT" + class test_cleanup_and_exit(unittest.TestCase): """ @@ -32,10 +33,10 @@ class test_cleanup_and_exit(unittest.TestCase): """ Test normal exit works as expected """ - open(pid_file, 'w') + open(pid_file, "w") with pytest.raises(SystemExit) as pytest_wrapped_sys_exit: - result = trapd_exit.cleanup_and_exit(0,pid_file) + result = trapd_exit.cleanup_and_exit(0, pid_file) assert pytest_wrapped_sys_exit.type == SystemExit assert pytest_wrapped_sys_exit.value.code == 0 @@ -44,6 +45,6 @@ class test_cleanup_and_exit(unittest.TestCase): Test exit with missing PID file exits non-zero """ with pytest.raises(SystemExit) as pytest_wrapped_sys_exit: - result = trapd_exit.cleanup_and_exit(0,pid_file_dne) + result = trapd_exit.cleanup_and_exit(0, pid_file_dne) assert pytest_wrapped_sys_exit.type == SystemExit assert pytest_wrapped_sys_exit.value.code == 1 |