Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74326f4 commit b6cea3cCopy full SHA for b6cea3c
google/api_core/client_options.py
@@ -50,6 +50,9 @@ class ClientOptions(object):
50
def __init__(self, api_endpoint=None):
51
self.api_endpoint = api_endpoint
52
53
+ def __repr__(self):
54
+ return "ClientOptions: " + repr(self.__dict__)
55
+
56
57
def from_dict(options):
58
"""Construct a client options object from a dictionary.
tests/unit/test_client_options.py
@@ -34,3 +34,9 @@ def test_from_dict_bad_argument():
34
client_options.from_dict(
35
{"api_endpoint": "foo.googleapis.com", "bad_arg": "1234"}
36
)
37
38
39
+def test_repr():
40
+ options = client_options.ClientOptions(api_endpoint="foo.googleapis.com")
41
42
+ assert repr(options) == "ClientOptions: {'api_endpoint': 'foo.googleapis.com'}"
0 commit comments