summaryrefslogtreecommitdiff
path: root/tests/try_execfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/try_execfile.py')
-rw-r--r--tests/try_execfile.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/try_execfile.py b/tests/try_execfile.py
index 314ffae0..ee5bae5c 100644
--- a/tests/try_execfile.py
+++ b/tests/try_execfile.py
@@ -54,12 +54,17 @@ def my_function(a):
FN_VAL = my_function("fooey")
+loader = globals().get('__loader__')
+fullname = getattr(loader, 'fullname', None) or getattr(loader, 'name', None)
+
globals_to_check = {
'__name__': __name__,
'__file__': __file__,
'__doc__': __doc__,
'__builtins__.has_open': hasattr(__builtins__, 'open'),
'__builtins__.dir': dir(__builtins__),
+ '__loader__ exists': loader is not None,
+ '__loader__.fullname': fullname,
'__package__': __package__,
'DATA': DATA,
'FN_VAL': FN_VAL,