File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -256,11 +256,11 @@ class ThreadUnsafe(Exception):
256256
257257
258258cdef class PyClient:
259+ cdef readonly list servers
260+ cdef readonly int comp_threshold
259261 cdef Client* _imp
260262 cdef bool_t do_split
261- cdef int comp_threshold
262263 cdef bool_t noreply
263- cdef list servers
264264 cdef bytes prefix
265265 cdef int last_error
266266 cdef object _thread_ident
Original file line number Diff line number Diff line change @@ -27,6 +27,12 @@ def setUp(self):
2727 self .compressed_mc = Client (["127.0.0.1:21211" ], comp_threshold = 1024 )
2828 self .noreply_mc = Client (["127.0.0.1:21211" ], noreply = True )
2929
30+ def test_attribute (self ):
31+ "Test attributes are accessible from Python code"
32+ mc = self .mc
33+ assert hasattr (mc , 'comp_threshold' )
34+ assert hasattr (mc , 'servers' )
35+
3036 def test_misc (self ):
3137 mc = self .mc
3238 mc .get_multi (['foo' , 'tuiche' ])
@@ -142,7 +148,7 @@ def test_injection(self):
142148 mc .delete ('injected' )
143149 mc .set ('key1' , '1234567890' )
144150 mc .set ('key1 0' , '123456789012345678901234567890\r \n '
145- 'set injected 0 3600 3\r \n INJ\r \n ' )
151+ 'set injected 0 3600 3\r \n INJ\r \n ' )
146152 assert mc .get ('injected' ) is None
147153
148154 def test_maxiov (self ):
You can’t perform that action at this time.
0 commit comments