Skip to content

Commit 1b3f0c0

Browse files
author
Sean Reifschneider
committed
Converting unicode test from using u''.
1 parent a90ac81 commit 1b3f0c0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* Converted unicode tests from using u'', patch from Eren Güve.
2+
13
* Included license file (pull request by "Philippe" pombredanne).
24

35
* Doing a "set" after server goes away, raised AttributeError:

memcache.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,13 +1336,13 @@ def __eq__(self, other):
13361336

13371337
print "Testing sending a unicode-string key...",
13381338
try:
1339-
x = mc.set(u'keyhere', 1)
1339+
x = mc.set(unicode('keyhere'), 1)
13401340
except Client.MemcachedStringEncodingError, msg:
13411341
print "OK",
13421342
else:
13431343
print "FAIL",; failures = failures + 1
13441344
try:
1345-
x = mc.set((u'a'*SERVER_MAX_KEY_LENGTH).encode('utf-8'), 1)
1345+
x = mc.set((unicode('a')*SERVER_MAX_KEY_LENGTH).encode('utf-8'), 1)
13461346
except:
13471347
print "FAIL",; failures = failures + 1
13481348
else:
@@ -1356,7 +1356,8 @@ def __eq__(self, other):
13561356
else:
13571357
print "FAIL"; failures = failures + 1
13581358

1359-
print "Testing using a value larger than the memcached value limit...",
1359+
print "Testing using a value larger than the memcached value limit..."
1360+
print 'NOTE: "MemCached: while expecting[...]" is normal...'
13601361
x = mc.set('keyhere', 'a'*SERVER_MAX_VALUE_LENGTH)
13611362
if mc.get('keyhere') == None:
13621363
print "OK",

0 commit comments

Comments
 (0)