changeset 109:78c4db4c2045

all done but the proper packaging
author catherine@dellzilla
date Fri, 24 Oct 2008 16:54:45 -0400
parents f7b0152c57f9
children 234fb764becd
files cmd2/cmd2.py cmd2/exampleSession.txt setup.py
diffstat 3 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/cmd2/cmd2.py	Fri Oct 24 16:38:25 2008 -0400
+++ b/cmd2/cmd2.py	Fri Oct 24 16:54:45 2008 -0400
@@ -24,7 +24,7 @@
 """
 import cmd, re, os, sys, optparse, subprocess, tempfile, pyparsing, doctest, unittest
 from optparse import make_option
-__version__ = '0.3.7'
+__version__ = '0.4'
 
 class OptionParser(optparse.OptionParser):
     def exit(self, status=0, msg=None):
@@ -728,8 +728,6 @@
         continuationPrompt = pyparsing.Suppress(pyparsing.lineStart + self.cmdapp.continuationPrompt)
         self.cmdtxtPattern = (prompt + pyparsing.restOfLine + pyparsing.ZeroOrMore(
             pyparsing.lineEnd + continuationPrompt + pyparsing.restOfLine))("command")   
-        
-        pass
     def inputGenerator(self):
         while True:
             self.refreshCommandFinder()
@@ -749,7 +747,8 @@
         
 class Cmd2TestCase(unittest.TestCase):
     '''Subclass this, setting CmdApp and transcriptFileName, to make a unittest.TestCase class
-       that will execute the commands in transcriptFileName and expect the results shown.'''
+       that will execute the commands in transcriptFileName and expect the results shown.
+       See example.py'''
     # problem: this (raw) case gets called by unittest.main - we don't want it to be.  hmm
     CmdApp = None
     transcriptFileName = ''
--- a/cmd2/exampleSession.txt	Fri Oct 24 16:38:25 2008 -0400
+++ b/cmd2/exampleSession.txt	Fri Oct 24 16:54:45 2008 -0400
@@ -1,3 +1,7 @@
+This is cut-and-pasted from an interactive example.py session.
+Calling `example.py -t` runs it as a series of unit tests,
+verifying that the same output is still returned.
+
 (Cmd) say goodnight, Gracie
 goodnight, Gracie
 (Cmd) say -p goodnight, Gracie
--- a/setup.py	Fri Oct 24 16:38:25 2008 -0400
+++ b/setup.py	Fri Oct 24 16:54:45 2008 -0400
@@ -4,7 +4,7 @@
 setup(
     name="cmd2",
     packages=["cmd2",],
-    version="0.3.7",
+    version="0.4",
     #py_modules = ['cmd2','flagReader','bootstrap'],
     
     # metadata for upload to PyPI
@@ -29,7 +29,8 @@
     * Parsing commands with flags
     * > (filename), >> (filename) redirect output to file
     * < (filename) gets input from file
-    * bare >, >>, < redirect to/from paste buffer     
+    * bare >, >>, < redirect to/from paste buffer
+    * test apps against sample session transcript (see example.py in source directory)
 
 Useable without modification anywhere cmd is used; simply import cmd2.Cmd in place of cmd.Cmd.