Did I find the right examples for you? yes no

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/p/a/palpy-1.0/test_pal.py   palpy(Download)
    def test_intin(self):
        s = "  -12345, , -0  2000  +     "
        i = 1
        (n, i, sign) = pal.intin( s, i )
        self.assertEqual( i, 10 )
        self.assertEqual( n, -12345 )
        self.assertLess( sign, 0 )
 
        (n, i, sign) = pal.intin( s, i )
        self.assertIsNone( n )
 
        (n, i, sign) = pal.intin( s, i )
        self.assertEqual( i, 17 )
        self.assertEqual( n, 0 )
        self.assertLess( sign, 0 )
 
        (n, i, sign) = pal.intin( s, i )
        self.assertGreater( sign, 0 )
 
        (n, i, sign) = pal.intin( s, i )
        self.assertEqual( i, 29 )
        self.assertIsNone( n )