From e6740cb39c94bb404797e6baed7bcdf534c422ed Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sat, 13 Feb 2010 14:37:17 +0000 Subject: Fixed #11944 -- Improved exception handling for the filesizeformat filter. Thanks to rfk for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12426 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/defaultfilters/tests.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/regressiontests/defaultfilters/tests.py b/tests/regressiontests/defaultfilters/tests.py index 4343586c48..0fe4673063 100644 --- a/tests/regressiontests/defaultfilters/tests.py +++ b/tests/regressiontests/defaultfilters/tests.py @@ -476,6 +476,15 @@ u'1024.0 MB' >>> filesizeformat(1024*1024*1024) u'1.0 GB' +>>> filesizeformat(complex(1,-1)) +u'0 bytes' + +>>> filesizeformat("") +u'0 bytes' + +>>> filesizeformat(u"\N{GREEK SMALL LETTER ALPHA}") +u'0 bytes' + >>> pluralize(1) u'' -- cgit v1.3