Skip to content
Snippets Groups Projects
Commit 3a9445c6 authored by Damien George's avatar Damien George
Browse files

tests/import: Add a test for the builtin __import__ function.

parent 2f7fad66
No related branches found
No related tags found
No related merge requests found
# test calling builtin import function
# basic test
__import__('builtins')
# first arg should be a string
try:
__import__(1)
except TypeError:
print('TypeError')
# level argument should be non-negative
try:
__import__('xyz', None, None, None, -1)
except ValueError:
print('ValueError')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment