diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2012-07-15 09:10:39 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2012-07-15 09:10:39 (GMT) |
commit | 3f94cbf9eba7adef027cfc5d087b3660800df9d7 (patch) | |
tree | 832bb91df8040ab37576ebfc1d2950b01c3f7111 /Lib/test/test_cmd_line_script.py | |
parent | 8dbe5b5568a9755b3e7c0f71df4b26a13893fd68 (diff) | |
download | cpython-3f94cbf9eba7adef027cfc5d087b3660800df9d7.zip cpython-3f94cbf9eba7adef027cfc5d087b3660800df9d7.tar.gz cpython-3f94cbf9eba7adef027cfc5d087b3660800df9d7.tar.bz2 |
Actually initialize __main__.__loader__ with loader instances, not the corresponding type objects
Diffstat (limited to 'Lib/test/test_cmd_line_script.py')
-rw-r--r-- | Lib/test/test_cmd_line_script.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py index 849abe2..8b6083e 100644 --- a/Lib/test/test_cmd_line_script.py +++ b/Lib/test/test_cmd_line_script.py @@ -37,7 +37,8 @@ f() assertEqual(result, ['Top level assignment', 'Lower level reference']) # Check population of magic variables assertEqual(__name__, '__main__') -_loader = __loader__ if isinstance(__loader__, type) else type(__loader__) +from importlib.machinery import BuiltinImporter +_loader = __loader__ if __loader__ is BuiltinImporter else type(__loader__) print('__loader__==%a' % _loader) print('__file__==%a' % __file__) assertEqual(__cached__, None) |