Пример #1
0
    def test_str_to_numeral__tint(self):
        "#str_to_numeral converte u'167.465' => int(167465)"

        Util.str_to_numeral(u'167.465') |should| equal_to(167465)
Пример #2
0
    def test_str_to_numeral__error(self):
        "#str_to_numeral lança TypeError se o argumento não é string"

        (lambda: Util.str_to_numeral(6578)) |should| throw(TypeError)
Пример #3
0
    def test_str_to_numeral__tfloat(self):
        "#str_to_numeral converte u'198.678,07' => float(198678.07)"

        Util.str_to_numeral(u'198.678,07') |should| equal_to(198678.07)