diff -r 8590e9b05069 Lib/unittest/__main__.py --- a/Lib/unittest/__main__.py Fri Sep 28 14:40:44 2012 +0100 +++ b/Lib/unittest/__main__.py Fri Sep 28 15:00:47 2012 +0100 @@ -2,7 +2,14 @@ import sys if sys.argv[0].endswith("__main__.py"): - sys.argv[0] = "python -m unittest" + import os.path + # We change sys.argv[0] to make help message more useful + # use executable without path, unquoted + # (it's just a hint anyway) + # (if you have spaces in your executable you get what you deserve!) + executable = os.path.basename(sys.executable) + sys.argv[0] = executable + " -m unittest" + del os __unittest = True