def testInt(self):
        self.assertEqual(int("5"), 5)
        self.assertEqual(int("09"), 9)
        self.assertEqual(6, 6)
        self.assertEqual(int("0"), 0)
        self.assertEqual(int(0), 0)
        self.assertEqual(int("-1"), -1)
        self.assertEqual(int("- 2"), -2)
        self.assertEqual(int(" - 3"), -3)

        try:
            int('')
            self.fail("No int() argument error raised: int('')")
        except __HOLE__, e:
            self.assertEqual(e[0], "invalid literal for int() with base 10: ''")

        try:
            int(' ')
            self.fail("No int() argument error raised: int(' ')")
        except ValueError, e:
            self.assertEqual(e[0], "invalid literal for int() with base 10: ''")

        try:
            int('not int')
            self.fail("No int() argument error raised: int('not-int')")
        except ValueError, e:
            self.assertEqual(e[0], "invalid literal for int() with base 10: 'not int'")

        try:
            int(1, 10)
            self.fail("No int() argument error raised: int(1, 10)")
        except TypeError, e:
            self.assertEqual(e[0], "int() can't convert non-string with explicit base")

        try:
            int('10px')
            self.fail("No int() argument error raised: int('10px')")
        except ValueError, e:
            self.assertEqual(e[0], "invalid literal for int() with base 10: '10px'")
dataset/ETHPy150Open anandology/pyjamas/examples/libtest/BuiltinTest.py/BuiltinTest.testInt