summaryrefslogtreecommitdiff
path: root/tests/micropython/viper_globals.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/micropython/viper_globals.py')
-rw-r--r--tests/micropython/viper_globals.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/micropython/viper_globals.py b/tests/micropython/viper_globals.py
index 9c68dc3da..9532dfd89 100644
--- a/tests/micropython/viper_globals.py
+++ b/tests/micropython/viper_globals.py
@@ -2,18 +2,21 @@
gl = {}
-exec("""
+exec(
+ """
@micropython.viper
def f():
return x
-""", gl)
+""",
+ gl,
+)
# x is not yet in the globals, f should not see it
try:
- print(gl['f']())
+ print(gl["f"]())
except NameError:
- print('NameError')
+ print("NameError")
# x is in globals, f should now see it
-gl['x'] = 123
-print(gl['f']())
+gl["x"] = 123
+print(gl["f"]())