Permalink
Browse files

Converting unicode test from using u''.

  • Loading branch information...
1 parent a90ac81 commit 1b3f0c0f35456dfd997e0a6c96150f52efbdff01 Sean Reifschneider committed Apr 17, 2013
Showing with 6 additions and 3 deletions.
  1. +2 −0 ChangeLog
  2. +4 −3 memcache.py
View
@@ -1,3 +1,5 @@
+ * Converted unicode tests from using u'', patch from Eren Güve.
+
* Included license file (pull request by "Philippe" pombredanne).
* Doing a "set" after server goes away, raised AttributeError:
View
@@ -1336,13 +1336,13 @@ def __eq__(self, other):
print "Testing sending a unicode-string key...",
try:
- x = mc.set(u'keyhere', 1)
+ x = mc.set(unicode('keyhere'), 1)
except Client.MemcachedStringEncodingError, msg:
print "OK",
else:
print "FAIL",; failures = failures + 1
try:
- x = mc.set((u'a'*SERVER_MAX_KEY_LENGTH).encode('utf-8'), 1)
+ x = mc.set((unicode('a')*SERVER_MAX_KEY_LENGTH).encode('utf-8'), 1)
except:
print "FAIL",; failures = failures + 1
else:
@@ -1356,7 +1356,8 @@ def __eq__(self, other):
else:
print "FAIL"; failures = failures + 1
- print "Testing using a value larger than the memcached value limit...",
+ print "Testing using a value larger than the memcached value limit..."
+ print 'NOTE: "MemCached: while expecting[...]" is normal...'
x = mc.set('keyhere', 'a'*SERVER_MAX_VALUE_LENGTH)
if mc.get('keyhere') == None:
print "OK",

0 comments on commit 1b3f0c0

Please sign in to comment.