Пример #1
0
 def testSpaceIsNotAllowedAsDecimalPoint(self):
     try:
         masked.AmountCtrl(self.frame,
                           locale_conventions=LocalConv(decimal_point=' '))
         self.fail('Expected ValueError')  # pragma: no cover
     except ValueError:
         pass
Пример #2
0
 def testMultiCharThousandsSeparator(self):
     masked.AmountCtrl(self.frame,
                       locale_conventions=LocalConv(thousands_sep='..'))
Пример #3
0
 def testNonAsciiThousandsSeparator(self):
     masked.AmountCtrl(self.frame,
                       locale_conventions=LocalConv(thousands_sep=u'�',
                                                    grouping=[3, 3, 3]))
Пример #4
0
 def testNonAsciiDecimalPoint(self):
     masked.AmountCtrl(self.frame,
                       locale_conventions=LocalConv(decimal_point=u'�'))
Пример #5
0
 def testCommaAsBothDecimalSepAndThousandsSepAndGrouping(self):
     masked.AmountCtrl(self.frame,
                       locale_conventions=LocalConv(decimal_point=',',
                                                    thousands_sep=',',
                                                    grouping=[3, 3, 3]))
Пример #6
0
 def testCommaAsDecimalSepAndNoGrouping(self):
     masked.AmountCtrl(self.frame,
                       locale_conventions=LocalConv(decimal_point=','))
Пример #7
0
 def testDefaultLocalConventions(self):
     masked.AmountCtrl(self.frame, locale_conventions=LocalConv())
Пример #8
0
 def setUp(self):
     super(AmountCtrlTest, self).setUp()
     self.amountCtrl = masked.AmountCtrl(self.frame)