summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Matusiak <numerodix@gmail.com>2014-03-08 14:54:57 +0100
committerMartin Matusiak <numerodix@gmail.com>2014-03-08 14:54:57 +0100
commit120647562667f8ad23e6b4364d3bfc4e8e2f63ac (patch)
treef81ede15b2257cfa5871599d8a889ced751606ee /tests
parent8c338d2570fdb942cbed066ff816a1921a36a1b6 (diff)
downloadansicolor-120647562667f8ad23e6b4364d3bfc4e8e2f63ac.tar.gz
fix string.rjust use for python3
Diffstat (limited to 'tests')
-rw-r--r--tests/test_colors.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_colors.py b/tests/test_colors.py
index 3cfedcb..edf51e9 100644
--- a/tests/test_colors.py
+++ b/tests/test_colors.py
@@ -85,6 +85,9 @@ def test_colordiff():
def test_justify_formatted():
+ def rjust(s, width):
+ return s.rjust(width)
+
assert justify_formatted(
- red("hi"), string.rjust, 10
+ red("hi"), rjust, 10
) == " " + red("hi")