summaryrefslogtreecommitdiff
path: root/tests/test_transcript.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix Deprecation warnings for escape sequenceskotfu2018-12-061-5/+5
|
* Fix flake8 issuesTodd Leonhardt2018-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | This commit contains a very large number of trivial changes in order to fix flake8 errors and warnings. Predominantly these are whitespace changes. Additionally, the build for Python 3.7 on TravisCI has been tweaked to fail if there are any flake8 errors using the following commandline: * flake8 . --count --ignore=E252 --max-complexity=31 --max-line-length=127 --show-source --statistics NOTE: In the future the max cyclomatic complexity should be lowered, but some improvements need to be made first. One flake8 error is being ignored entirely: * E252 missing whitespace around parameter equals * ignored because it doesn't correctly deal with default argument values after a type hint A few flake8 errors are being selectively ignored in certain files: * C901 fuction is too complex * ignored in argparse_completer.py because the complex code is an override of argparse complexity * E302 expected 2 blank lines after ... * ignored in all unit test files for convenience * F401 module imported but unused * ignored in cmd2/__init__.py because imports are for convenience of cmd2 developers and backwards compatibility * F821 undefined name * ignored in cmd2 script files which are intended to run only within cmd2 applications via pyscript where "app" and "cmd" are defined
* Fixed transcript testing bug where last command in transcript has no ↵Todd Leonhardt2018-09-301-0/+1
| | | | | | | expected output Also: - Added unit test for this specific case
* Merged master into transcript_fixes branch and resolved conflictsTodd Leonhardt2018-09-301-7/+9
|\
| * Fixed several hack classes build to simulate file descriptorsTodd Leonhardt2018-09-231-7/+9
| | | | | | | | | | | | | | | | | | Now there is a single class, StdSim in utils.py, which is intended to simulate stdout and stderr file objects. This class replaced the following: - pyscript_bridge.py::CopyStream - transcript.py::OutputTrap - conftest.py::StdOut
* | Add transcript test for commands with no outputkotfu2018-09-141-1/+6
|/
* Fixed a couple potential crashes on opening filesTodd Leonhardt2018-06-061-0/+26
| | | | | | | | Fixed crashes that occur when attempting to open a file in a non-existent directory or a when the filename is too long. Specifically fixed this when redirecting output to a file and when saving a transcript based on the history. Also added a couple unit tests related to the fixes.
* Standardize cmd2 imports in tests and exampleskotfu2018-05-231-1/+1
|
* Defer import of unittestkotfu2018-05-061-1/+2
|
* Refactor transcript from history implementation and testkotfu2018-05-041-10/+8
|
* Fix transcript generate to close #385kotfu2018-05-041-0/+1
|
* Fix #384, multiline commands now appear properly in transcriptskotfu2018-05-031-2/+1
|
* Unit test for history transcript generationkotfu2018-05-031-108/+31
|
* Moved some argparse tests from test_transcript.py to test_argparse.pykotfu2018-05-031-31/+0
|
* Fix commented out transcript testskotfu2018-05-031-4/+3
|
* Merge branch 'test_merge' into test_ply_mergeEric Lin2018-05-021-3/+3
|\
| * Removed the expensive imports from cmd2/__init__.pyEric Lin2018-04-251-4/+4
| | | | | | | | | | | | | | Added some shared definitions to cmd2/__init__.py -> maybe there's a better place for these? Figured out how to trick bash into showing argument hints. It's a bit weird. Updated all of the tests and examples to import cmd2 resources from their new location without the automatic imports in cmd2/__init__.py For #369
* | multilineCommands -> multiline_commandskotfu2018-04-291-2/+2
| |
* | Remove POSIX_SHLEX and STRIP_QUOTES_FOR_NON_POSIXkotfu2018-04-251-5/+0
|/
* Cleaned up __init__.pyTodd Leonhardt2018-04-171-5/+5
| | | | | Removed things which were only needed for unit tests from __init__.py - Converted to importing from cmd2.cmd2.<foo> within the relevant unit tests
* Most of the unit tests fixed.kotfu2018-04-161-1/+1
|
* Basic structure for cmd2 as a packagekotfu2018-04-161-1/+1
|
* Revert "Basic structure for cmd2 as a package"kotfu2018-04-161-1/+1
| | | | This reverts commit 4a3d01b679c5db7f6cb670ca981a953eb3b98dc5.
* Basic structure for cmd2 as a packagekotfu2018-04-161-1/+1
| | | | Still have a fair amount of work to do to get this sorted.
* Finished removing all dependencies on the six moduleTodd Leonhardt2018-04-151-1/+0
|
* Started removing dependency on sixTodd Leonhardt2018-04-151-8/+3
| | | | | | | Removed all dependency on six other than for six.moves.input Also: - Started removing code branches which were for Python 2 support
* Removed unit test dependency on mockTodd Leonhardt2018-04-151-1/+1
| | | | | mock was a backport of Python's built in unittest.mock and was required for Python 3.2 or earlier - Since we now support Python 3.4+ moving forward we no longer need to make use of the 3rd party mock module
* Deleted optparse code which had been previously deprecated in 0.8.0 releaseTodd Leonhardt2018-04-091-60/+30
| | | | | Also: - Bumped version to 0.8.4
* More unit test fixesKevin Van Brunt2018-03-161-2/+2
|
* Removed abbrev attributeKevin Van Brunt2018-03-021-2/+1
|
* Remove do_save() and do_run() for #252kotfu2018-01-161-3/+3
|
* cmdenvironment command has been removed and its functionality now exists as ↵Todd Leonhardt2018-01-151-2/+2
| | | | a -a/--all option to the set command
* show command has been removedTodd Leonhardt2018-01-151-2/+2
| | | | | | It's functionality has been moved inside the set command. The set command now uses an argparse parser.
* __relative_load command is now hidden from help menu by defaultTodd Leonhardt2018-01-151-6/+2
|
* Made a couple cleanup changesTodd Leonhardt2018-01-151-3/+4
| | | | | | | | | 1) cmd2 no longer imports make_option from optparse - test files and examples now import this directly - this helps emphasize that this old optparse methodology of adding options to commands is deprecated 2) All argparsers have been given custom names instead of just "argparser" - this helps with readability and maintainability, especially with IDE renaming and such
* Fix test_transcript.py in python 3.7kotfu2018-01-061-12/+17
| | | | re.escape() changed behavior in python 3.7.
* Fix a bug if there is only one slashJared Crapo2017-08-221-3/+7
|
* Add comments to all regex test filesJared Crapo2017-08-221-1/+0
|
* Updates to CmdLineApp()Jared Crapo2017-08-211-5/+5
|
* regex implementation complete. Still a few bugs.Jared Crapo2017-08-211-12/+38
|
* Checkpoint. Many tests working, multiline seems brokenJared Crapo2017-08-211-4/+9
|
* Simple but working version of new regex transcriptJared Crapo2017-08-211-1/+21
| | | | Escapes of slashes don’t work yet.
* Add lots more transcript testsJared Crapo2017-08-201-2/+12
|
* parametrize transcript testsJared Crapo2017-08-201-56/+8
|
* rename transcript filesJared Crapo2017-08-201-4/+4
|
* Move transcripts into their own directoryJared Crapo2017-08-201-3/+3
|
* feedback_to_output now defaults to FalseTodd Leonhardt2017-08-201-1/+1
| | | | This is so that non-essential info which isn't directly associated with command output, such as time elapsed while executing a command, won't redirect when command output is redirected using >, >>, or |.
* Fixed a few bugs and examplesTodd Leonhardt2017-07-031-0/+1
| | | | | | | | | | | | | | Bug fixes: - case_insensitive is no longer a runtime-settable parameter, but it was still listed as such - Fixed a recursive loop bug when abbreviated commands are enabled and it could get stuck in the editor forever - Added additional command abbreviations to the "exclude from history" list - Fixed argparse_example.py and pirate.py examples Other changes: - Organized all attributes used to configure the ParserManager into a single location - Set the default value of "abbrev" to False (which controls whether or not abbreviated commands are allowed) - With good tab-completion of command names, using abbreviated commands isn't a particularly useful feature - And it can create problems
* Removed pause commandTodd Leonhardt2017-07-031-3/+2
| | | | | | It was pretty useless, it just printed a message and sat there and waited for the user to hit enter. It didn't feel like it belonged in a top-level framework. If a particular application wants this functionality, it is a 2 line change to add it back.
* Fixed bugs, removed dead code, and added unit testsTodd Leonhardt2017-07-021-1/+2
| | | | | | | | | | | Fixed a bug where CmdResult named tuple Truthiness wasn't working in Python 2 Removed unused cmd2.History.search() method. Added unit tests for: - History class - cast() function - CmdResult namedtuple