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