diff -r 62ddf16eea24 Lib/unittest/__main__.py --- a/Lib/unittest/__main__.py Mon Sep 24 17:31:37 2012 +0300 +++ b/Lib/unittest/__main__.py Fri Sep 28 10:17:06 2012 +0100 @@ -2,7 +2,13 @@ import sys if sys.argv[0].endswith("__main__.py"): - sys.argv[0] = "python -m unittest" + import os.path + # 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