summaryrefslogtreecommitdiff
path: root/tests/cmdline/repl_micropyinspect.py
diff options
context:
space:
mode:
authorDavid Lechner <david@pybricks.com>2020-02-01 21:10:42 -0600
committerDamien George <damien.p.george@gmail.com>2020-02-04 17:54:31 +1100
commit4a97f7aaf3c9123a7f127d6986b0f61ce9361beb (patch)
treea47685d7e4b399a4518608cc8815cb3fcb688a40 /tests/cmdline/repl_micropyinspect.py
parentf1b6e6bb158f5d59c78212c9d3bd651a4af81829 (diff)
tests/cmdline: Add test for MICROPYINSPECT environment variable.
When this variable is set to non-empty string it triggers the REPL after a command/module/file finishes running. The Python file without the file extension is because the cmdline: parser in run-test splits on spaces, so we can't use the -c option since `import os` can't be written without a space.
Diffstat (limited to 'tests/cmdline/repl_micropyinspect.py')
-rw-r--r--tests/cmdline/repl_micropyinspect.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/cmdline/repl_micropyinspect.py b/tests/cmdline/repl_micropyinspect.py
new file mode 100644
index 000000000..220dd43d8
--- /dev/null
+++ b/tests/cmdline/repl_micropyinspect.py
@@ -0,0 +1,2 @@
+# cmdline: cmdline/repl_micropyinspect
+# setting MICROPYINSPECT environment variable before program exit triggers REPL