summaryrefslogtreecommitdiff
path: root/example/example.py
diff options
context:
space:
mode:
authorCatherine Devlin <catherine.devlin@gmail.com>2010-02-11 18:22:17 -0500
committerCatherine Devlin <catherine.devlin@gmail.com>2010-02-11 18:22:17 -0500
commitf45bd918f9c15c0c65d5b10d59fce2f1f746fb4f (patch)
tree3dd4c487c62b65fb260a5f47f5a25289db47c14e /example/example.py
parent7eebfe29f36f535d94b43d4f67ecb7d16df315fc (diff)
downloadcmd2-git-f45bd918f9c15c0c65d5b10d59fce2f1f746fb4f.tar.gz
initial args working
Diffstat (limited to 'example/example.py')
-rwxr-xr-xexample/example.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/example/example.py b/example/example.py
index edc54020..f9c89b60 100755
--- a/example/example.py
+++ b/example/example.py
@@ -1,6 +1,6 @@
'''A sample application for cmd2.'''
-from cmd2 import Cmd, make_option, options, Cmd2TestCase, run
+from cmd2 import Cmd, make_option, options, run
import unittest, optparse, sys
class CmdLineApp(Cmd):
@@ -32,17 +32,3 @@ class CmdLineApp(Cmd):
c = CmdLineApp()
run(c)
-
-'''
-class TestMyAppCase(Cmd2TestCase):
- CmdApp = CmdLineApp
-parser = optparse.OptionParser()
-parser.add_option('-t', '--test', dest='test', action="store_true",
- help='Test against transcript(s) in FILE (wildcards OK)')
-(callopts, callargs) = parser.parse_args()
-if callopts.test:
- CmdLineApp.testfiles = callargs
- sys.argv = [sys.argv[0]] # the --test argument upsets unittest.main()
- unittest.main()
-else:
- CmdLineApp().cmdloop()'''