Permalink
Browse files

Merge pull request #252 from elkrisu/master

Verbosity level 3 in commandline causing sys.exit(2)
  • Loading branch information...
2 parents 49c5143 + 8e9f744 commit 3e2948bc3a5403752053de000bb589c90d4bf462 @gabrielfalcao gabrielfalcao committed Apr 30, 2012
Showing with 8 additions and 1 deletion.
  1. +1 −1 lettuce/strings.py
  2. +7 −0 tests/unit/test_strings.py
View
@@ -74,7 +74,7 @@ def remove_it(string, what):
def column_width(string):
l = 0
- for c in string:
+ for c in unicode(string):
if unicodedata.east_asian_width(c) in "WF":
l += 2
else:
@@ -136,6 +136,13 @@ def test_column_width():
10
)
+def test_column_width_w_number_and_char():
+ "strings.column_width_w_number_and_char"
+ assert_equals(
+ strings.column_width( u"%s%c" % (u"4209", 0x4209)),
+ 6
+ )
+
def test_rfill_simple():
"strings.rfill simple case"
assert_equals(

0 comments on commit 3e2948b

Please sign in to comment.