#!/www/python/bin/python
"""$URL: svn+ssh://svn.mems-exchange.org/repos/trunk/dulcinea/lib/ui/test/test_util.py $
$Id: test_util.py 24192 2004-05-11 19:33:24Z dbinger $
"""
from quixote import enable_ptl
enable_ptl()
from sancho.unittest import TestScenario, parse_args, run_scenarios
from dulcinea.ui.util import comma_format

tested_modules = ["dulcinea.ui.util"]

class MiscTest (TestScenario):

    def check_comma (self):
        self.test_val("comma_format(0)", "0")
        self.test_val("comma_format(1)", "1")
        self.test_val("comma_format(15)", "15")
        self.test_val("comma_format(953)", "953")
        self.test_val("comma_format(1001)", "1,001")
        self.test_val("comma_format(10543)", "10,543")
        self.test_val("comma_format(1024*1024)", "1,048,576")
        self.test_val("comma_format(10L**21-1)", "999,999,999,999,999,999,999")

if __name__ == "__main__":
    (scenarios, options) = parse_args()
    run_scenarios(scenarios, options)
