diff --git a/tests/python_client/testcases/test_connection_20.py b/tests/python_client/testcases/test_connection.py similarity index 99% rename from tests/python_client/testcases/test_connection_20.py rename to tests/python_client/testcases/test_connection.py index b31af496cd..07997a9541 100644 --- a/tests/python_client/testcases/test_connection_20.py +++ b/tests/python_client/testcases/test_connection.py @@ -750,9 +750,9 @@ class TestConnectionOperation(TestcaseBase): class TestConnect: def local_ip(self, args): - ''' + """ check if ip is localhost or not - ''' + """ if not args["ip"] or args["ip"] == 'localhost' or args["ip"] == "127.0.0.1": return True else: @@ -760,31 +760,31 @@ class TestConnect: @pytest.mark.tags(ct.CaseLabel.L2) def test_close_repeatedly(self, dis_connect, args): - ''' + """ target: test disconnect repeatedly method: disconnect a connected client, disconnect again expected: raise an error after disconnected - ''' + """ with pytest.raises(Exception) as e: dis_connect.close() @pytest.mark.tags(ct.CaseLabel.L2) def test_connect_uri(self, args): - ''' + """ target: test connect with correct uri method: uri format and value are both correct expected: connected is True - ''' + """ uri_value = "tcp://%s:%s" % (args["ip"], args["port"]) milvus = get_milvus(args["ip"], args["port"], uri=uri_value, handler=args["handler"]) @pytest.mark.tags(ct.CaseLabel.L2) def test_connect_uri_null(self, args): - ''' + """ target: test connect with null uri method: uri set null expected: connected is True - ''' + """ uri_value = "" if self.local_ip(args): milvus = get_milvus(None, None, uri=uri_value, handler=args["handler"]) @@ -794,11 +794,11 @@ class TestConnect: @pytest.mark.tags(ct.CaseLabel.L2) def test_connect_with_multiprocess(self, args): - ''' + """ target: test uri connect with multiprocess method: set correct uri, test with multiprocessing connecting expected: all connection is connected - ''' + """ def connect(): milvus = get_milvus(args["ip"], args["port"], handler=args["handler"]) @@ -812,11 +812,11 @@ class TestConnect: @pytest.mark.tags(ct.CaseLabel.L2) def test_connect_repeatedly(self, args): - ''' + """ target: test connect repeatedly method: connect again expected: status.code is 0, and status.message shows have connected already - ''' + """ uri_value = "tcp://%s:%s" % (args["ip"], args["port"]) milvus = Milvus(uri=uri_value, handler=args["handler"]) milvus = Milvus(uri=uri_value, handler=args["handler"]) @@ -857,11 +857,11 @@ class TestConnectPortInvalid(object): @pytest.mark.tags(ct.CaseLabel.L2) @pytest.mark.timeout(CONNECT_TIMEOUT) def test_connect_with_invalid_port(self, args, get_invalid_port): - ''' + """ target: test ip:port connect with invalid port value method: set port in gen_invalid_ports expected: connected is False - ''' + """ port = get_invalid_port with pytest.raises(Exception) as e: milvus = get_milvus(args["ip"], port, args["handler"]) @@ -882,11 +882,11 @@ class TestConnectURIInvalid(object): @pytest.mark.tags(ct.CaseLabel.L2) @pytest.mark.timeout(CONNECT_TIMEOUT) def test_connect_with_invalid_uri(self, get_invalid_uri, args): - ''' + """ target: test uri connect with invalid uri value method: set port in gen_invalid_uris expected: connected is False - ''' + """ uri_value = get_invalid_uri with pytest.raises(Exception) as e: milvus = get_milvus(uri=uri_value, handler=args["handler"]) diff --git a/tests/python_client/testcases/test_e2e_20.py b/tests/python_client/testcases/test_e2e.py similarity index 100% rename from tests/python_client/testcases/test_e2e_20.py rename to tests/python_client/testcases/test_e2e.py