diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2016-10-07 13:39:58 +0800 |
---|---|---|
committer | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2016-10-07 13:40:06 +0800 |
commit | 8c93dffbb4bf51e60096cab465dbd2a5f62feb34 (patch) | |
tree | 2ddc12c950d959f555df70b255e4b753497840f4 | |
parent | 33d953b9c4a7ecada927af3b1666d15e3f389beb (diff) |
Rename class cli to Cli
class name should be CamelCase
Change-Id: I3b68b14483a475499baf832eb1af93ecca171b14
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
-rw-r--r-- | func/cli.py | 2 | ||||
-rw-r--r-- | qtip.py | 4 | ||||
-rw-r--r-- | tests/cli_test.py | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/func/cli.py b/func/cli.py index 833437d5..7d526203 100644 --- a/func/cli.py +++ b/func/cli.py @@ -13,7 +13,7 @@ import args_handler import argparse -class cli: +class Cli: @staticmethod def _parse_args(args): @@ -6,13 +6,13 @@ # which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-from func.cli import cli
+from func.cli import Cli
import os
def main():
os.system('./data/file_permission.sh')
- cli()
+ Cli()
# os.system('cd data/ref_results && python compute_suite.py')
# os.system('cd data/ref_results && python storage_suite.py')
# os.system('cd data/ref_results && python network_suite.py')
diff --git a/tests/cli_test.py b/tests/cli_test.py index fe05327d..12d0abb0 100644 --- a/tests/cli_test.py +++ b/tests/cli_test.py @@ -1,7 +1,7 @@ import pytest import mock import os -from func.cli import cli +from func.cli import Cli class TestClass: @@ -19,7 +19,7 @@ class TestClass: k = mock.patch.dict(os.environ, {'INSTALLER_TYPE': 'fuel', 'PWD': '/home'}) with pytest.raises(SystemExit): k.start() - cli(test_input) + Cli(test_input) k.stop() resout, reserr = capfd.readouterr() assert expected in resout @@ -35,7 +35,7 @@ class TestClass: def test_cli_successful(self, mock_args_handler, test_input, expected): k = mock.patch.dict(os.environ, {'INSTALLER_TYPE': 'fuel', 'PWD': '/home'}) k.start() - cli(test_input) + Cli(test_input) k.stop() call_list = map(lambda x: mock_args_handler.call_args_list[x][0], range(len(expected))) assert sorted(call_list) == sorted(expected) |