1# test calling builtin import function
2
3# basic test
4__import__("builtins")
5
6# first arg should be a string
7try:
8    __import__(1)
9except TypeError:
10    print("TypeError")
11
12# module name should not be empty
13try:
14    __import__("")
15except ValueError:
16    print("ValueError")
17
18# level argument should be non-negative
19try:
20    __import__("xyz", None, None, None, -1)
21except ValueError:
22    print("ValueError")
23