Example #1
0
 def test_test(self):
     self.assertTrue(
         NumberWithNonNumbers.test(['Date', 'Number'], [])
     )
     self.assertFalse(
         NumberWithNonNumbers.test(['Date', 'Postal Code'], [])
     )
Example #2
0
    def test_normalize(self):
        result = ParseResult('Number', None, 70)

        results = NumberWithNonNumbers.normalize([result])

        count = 0
        for res in results:
            count += 1
            self.assertEqual(res.confidence, 35)

        self.assertEqual(count, len(results))