Skip to content

Commit

Permalink
Merge pull request gabrielfalcao#252 from elkrisu/master
Browse files Browse the repository at this point in the history
Verbosity level 3 in commandline causing sys.exit(2)
  • Loading branch information
gabrielfalcao committed Apr 30, 2012
2 parents 49c5143 + 8e9f744 commit 3e2948b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lettuce/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions tests/unit/test_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 3e2948b

Please sign in to comment.