diff example/example.py @ 258:7a98d7f2da30

I get it - BASH line expansion of file names gets me
author Catherine Devlin <catherine.devlin@gmail.com>
date Thu, 02 Apr 2009 17:22:02 -0400
parents d62bb3dd58a0
children 5147fa4166b0
line wrap: on
line diff
--- a/example/example.py	Thu Apr 02 15:55:33 2009 -0400
+++ b/example/example.py	Thu Apr 02 17:22:02 2009 -0400
@@ -32,13 +32,18 @@
 
 class TestMyAppCase(Cmd2TestCase):
     CmdApp = CmdLineApp
-
+import logging
+logging.basicConfig(level=logging.DEBUG,
+                    filename='exlog.txt',
+                    filemode='w')
 parser = optparse.OptionParser()
 parser.add_option('-t', '--test', dest='test', metavar='FILE', 
                   help='''Test against transcript(s) in FILE (wildcards OK)''')                  
 (callopts, callargs) = parser.parse_args()
+logging.error(callopts)
 if callopts.test:
     CmdLineApp.testfile = callopts.test
+    logging.error(CmdLineApp.testfile)
     sys.argv = [sys.argv[0]] # the --test argument upsets unittest.main()
     unittest.main()
 else: