diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-08-22 21:16:22 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-08-22 21:16:22 -0400 |
commit | 8fe6e0fe6e3d019ed90009f9d914864c9263f486 (patch) | |
tree | acdd6f3e0fed26fd9fdd714b7e56fefbe415a8b0 | |
parent | 319e66b3076e340270fbb74eb01936f88b5c268c (diff) | |
download | cmd2-git-8fe6e0fe6e3d019ed90009f9d914864c9263f486.tar.gz |
Updated CHANGELOG with some text regarding recent enhancements to transcript regexes
Also bumped version from 0.7.7a to 0.7.7 in preparation for eventual next release.
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rwxr-xr-x | cmd2.py | 10 | ||||
-rw-r--r-- | docs/conf.py | 2 | ||||
-rwxr-xr-x | setup.py | 2 | ||||
-rw-r--r-- | tests/test_cmd2.py | 2 |
5 files changed, 13 insertions, 8 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 02ae8f45..230fa774 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ * For ``edit`` command, both **editor** and **filename** can now have spaces in the name/path * Enhancements * ``feedback_to_output`` now defaults to ``False`` so info like command timing won't redirect + * Transcript regexes now have predictable, tested, and documented behavior + * This makes a breaking change to the format and expectations of transcript testing + * The prior behavior removed whitespace before making the comparison + * This new version does not, whitespace must match exactly + * Transcripts now support a vastly expanded subset of all possible regexes ## 0.7.6 (August 11, 2017) @@ -98,7 +98,7 @@ if six.PY3: else: BROKEN_PIPE_ERROR = IOError -__version__ = '0.7.7a' +__version__ = '0.7.7' # Pyparsing enablePackrat() can greatly speed up parsing, but problems have been seen in Python 3 in the past pyparsing.ParserElement.enablePackrat() @@ -2305,7 +2305,7 @@ class Cmd2TestCase(unittest.TestCase): break line_num += 1 expected = ''.join(expected) - + # transform the expected text into a valid regular expression expected = self._transform_transcript_expected(expected) message = '\nFile {}, line {}\nCommand was:\n{}\nExpected:\n{}\nGot:\n{}\n'.format( @@ -2318,7 +2318,7 @@ class Cmd2TestCase(unittest.TestCase): backslash = '\\' regex = '' start = 0 - + while True: (regex, first_slash_pos, start) = self._escaped_find(regex, s, start, False) if first_slash_pos == -1: @@ -2349,12 +2349,12 @@ class Cmd2TestCase(unittest.TestCase): def _escaped_find(self, regex, s, start, in_regex): """ Find the next slash in {s} after {start} that is not preceded by a backslash. - + If we find an escaped slash, add everything up to and including it to regex, updating {start}. {start} therefore serves two purposes, tells us where to start looking for the next thing, and also tells us where in {s} we have already added things to {regex} - + {in_regex} specifies whether we are currently searching in a regex, we behave differently if we are or if we aren't. """ diff --git a/docs/conf.py b/docs/conf.py index 52ca820b..f79d5b3c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -62,7 +62,7 @@ author = 'Catherine Devlin and Todd Leonhardt' # The short X.Y version. version = '0.7' # The full version, including alpha/beta/rc tags. -release = '0.7.7a' +release = '0.7.7' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -5,7 +5,7 @@ Setuptools setup file, used to install or test 'cmd2' """ from setuptools import setup -VERSION = '0.7.7a' +VERSION = '0.7.7' DESCRIPTION = "cmd2 - a tool for building interactive command line applications in Python" LONG_DESCRIPTION = """cmd2 is a tool for building interactive command line applications in Python. Its goal is to make it quick and easy for developers to build feature-rich and user-friendly interactive command line applications. It diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index 10631ffa..51421bcb 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -23,7 +23,7 @@ from conftest import run_cmd, normalize, BASE_HELP, HELP_HISTORY, SHORTCUTS_TXT, def test_ver(): - assert cmd2.__version__ == '0.7.7a' + assert cmd2.__version__ == '0.7.7' def test_empty_statement(base_app): |