diff options
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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. """ |