summaryrefslogtreecommitdiff
path: root/Lib/unittest/__main__.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/unittest/__main__.py')
-rw-r--r--Lib/unittest/__main__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/unittest/__main__.py b/Lib/unittest/__main__.py
new file mode 100644
index 0000000000..7320050ae9
--- /dev/null
+++ b/Lib/unittest/__main__.py
@@ -0,0 +1,12 @@
+"""Main entry point"""
+
+import sys
+if sys.argv[0].endswith("__main__.py"):
+ sys.argv[0] = "python -m unittest"
+
+__unittest = True
+
+from .main import main, TestProgram, USAGE_AS_MAIN
+TestProgram.USAGE = USAGE_AS_MAIN
+
+main(module=None)