Esempio n. 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
Esempio n. 2
0
 def testMultiCharThousandsSeparator(self):
     masked.AmountCtrl(self.frame,
                       locale_conventions=LocalConv(thousands_sep='..'))
Esempio n. 3
0
 def testNonAsciiThousandsSeparator(self):
     masked.AmountCtrl(self.frame,
                       locale_conventions=LocalConv(thousands_sep=u'�',
                                                    grouping=[3, 3, 3]))
Esempio n. 4
0
 def testNonAsciiDecimalPoint(self):
     masked.AmountCtrl(self.frame,
                       locale_conventions=LocalConv(decimal_point=u'�'))
Esempio n. 5
0
 def testCommaAsBothDecimalSepAndThousandsSepAndGrouping(self):
     masked.AmountCtrl(self.frame,
                       locale_conventions=LocalConv(decimal_point=',',
                                                    thousands_sep=',',
                                                    grouping=[3, 3, 3]))
Esempio n. 6
0
 def testCommaAsDecimalSepAndNoGrouping(self):
     masked.AmountCtrl(self.frame,
                       locale_conventions=LocalConv(decimal_point=','))
Esempio n. 7
0
 def testDefaultLocalConventions(self):
     masked.AmountCtrl(self.frame, locale_conventions=LocalConv())
Esempio n. 8
0
 def setUp(self):
     super(AmountCtrlTest, self).setUp()
     self.amountCtrl = masked.AmountCtrl(self.frame)