Lichen

Change of tests/int.py

932:c07b0dd14f85
tests/int.py
     1.1 --- a/tests/int.py	Sun Jun 27 22:39:01 2021 +0200
     1.2 +++ b/tests/int.py	Mon Jun 28 00:13:11 2021 +0200
     1.3 @@ -11,3 +11,20 @@
     1.4      a = int("a")        # should raise an exception
     1.5  except ValueError, exc:
     1.6      print 'int("a") failed:', exc.value
     1.7 +
     1.8 +try:
     1.9 +    a = int("!")        # should raise an exception
    1.10 +except ValueError, exc:
    1.11 +    print 'int("!") failed:', exc.value
    1.12 +
    1.13 +a = int("a", 16)
    1.14 +b = int("123")
    1.15 +print a                 # 10
    1.16 +print b, i, b == i      # 123, 123, True
    1.17 +print b, j, b == j      # 123, 123, True
    1.18 +
    1.19 +a_is_int = isinstance(a, int)
    1.20 +j_is_int = isinstance(j, int)
    1.21 +
    1.22 +print a_is_int          # True
    1.23 +print j_is_int          # True