コード例 #1
0
ファイル: test_i18n.py プロジェクト: zaxebo1/liberapay.com
 def test_format_money_without_trailing_zeroes(self):
     result = LOCALE_EN.format_money(Money(16, 'USD'),
                                     trailing_zeroes=False)
     assert result == '$16'
     result = LOCALE_EN.format_money(Money(5555, 'KRW'),
                                     trailing_zeroes=False)
     assert result == '₩5,555'
コード例 #2
0
ファイル: test_i18n.py プロジェクト: zaxebo1/liberapay.com
 def test_format_money_defaults_to_trailing_zeroes(self):
     result = LOCALE_EN.format_money(Money(16, 'USD'))
     assert result == '$16.00'
     result = LOCALE_EN.format_money(Money(5555, 'KRW'))
     assert result == '₩5,555'
コード例 #3
0
ファイル: test_i18n.py プロジェクト: sicXnull/liberapay.com
 def test_format_currency_defaults_to_trailing_zeroes(self):
     expected = '$16.00'
     actual = LOCALE_EN.format_money(Money(16, 'USD'))
     assert actual == expected
コード例 #4
0
ファイル: test_i18n.py プロジェクト: sicXnull/liberapay.com
 def test_format_currency_without_trailing_zeroes(self):
     expected = '$16'
     actual = LOCALE_EN.format_money(Money(16, 'USD'), trailing_zeroes=False)
     assert actual == expected
コード例 #5
0
ファイル: test_i18n.py プロジェクト: liberapay/liberapay.com
 def test_format_currency_defaults_to_trailing_zeroes(self):
     expected = '$16.00'
     actual = LOCALE_EN.format_money(Money(16, 'USD'))
     assert actual == expected
コード例 #6
0
ファイル: test_i18n.py プロジェクト: liberapay/liberapay.com
 def test_format_currency_without_trailing_zeroes(self):
     expected = '$16'
     actual = LOCALE_EN.format_money(Money(16, 'USD'), trailing_zeroes=False)
     assert actual == expected