Commits

Georg Brandl  committed f560a81

Small fixes to test_cmd: fix signature of do_shell, remove duplicate import, add option to run the custom Cmd class.

  • Participants
  • Parent commits 882c9e7
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Lib/test/test_cmd.py

         print "complete command"
         return
 
-    def do_shell(self):
+    def do_shell(self, s):
         pass
 
     def do_add(self, s):
     from test import test_support, test_cmd
     test_support.run_doctest(test_cmd, verbose)
 
-import trace, sys
 def test_coverage(coverdir):
+    import trace
     tracer=trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix,],
                         trace=0, count=1)
     tracer.run('reload(cmd);test_main()')
 if __name__ == "__main__":
     if "-c" in sys.argv:
         test_coverage('/tmp/cmd.cover')
+    elif "-i" in sys.argv:
+        samplecmdclass().cmdloop()
     else:
         test_main()