summaryrefslogtreecommitdiff
path: root/tests/test_cmd2.py
Commit message (Collapse)AuthorAgeFilesLines
* Updated version numberKevin Van Brunt2018-08-011-1/+1
|
* Backported file open crash fixes for Issue #430 to python2 branchTodd Leonhardt2018-06-071-1/+39
| | | | | | Also: - Bumped version on python2 branch to 0.8.8 - Updated CHANGELOG
* Trying 0.8.7 for #4210.8.7kotfu2018-05-281-1/+1
|
* Update version to 0.8.6.1 for #4210.8.6.1kotfu2018-05-281-1/+1
|
* no dashes in rc version0.8.7rc1kotfu2018-05-281-1/+1
|
* Add ‘python-requires >= 2.7’ for #421kotfu2018-05-281-1/+1
|
* Created python2 branch for 0.8.x bug fix releasesTodd Leonhardt2018-04-151-1/+1
| | | | | Also: - Bumped version to 0.8.6 on this branch
* Preparation for 0.8.5 releaseTodd Leonhardt2018-04-131-1/+1
| | | | | - Bumped version to 0.8.5 - Added details to CHANGELOG.md regarding recent changes
* Added a with_category decorator that can be used to tag a command category.Eric Lin2018-04-111-4/+3
| | | | | | | | | Changed the detection of with_argparse decorated commands to be less hacky/brittle. Now it tags the function with help_summary. Fixed issue with handling commands that provide a custom help_ function. We can now redirect the output to a string to be formatted with the other commands. Added some documentation explaining the new help categories. Updated unit tests.
* Fixed issue where categorization is skipped when there's a help_<command> ↵Eric Lin2018-04-111-2/+101
| | | | | | | | function provided. In verbose help, added check for argparse usage block (starting with 'usage: '), to skip that block and move to the next comment block Added unit tests for new categorization code Updated example to demonstrate skipping of argparse usage statement
* Preparing for 0.8.4 release0.8.4Kevin Van Brunt2018-04-101-1/+1
|
* Updated version number of release0.8.3Kevin Van Brunt2018-04-091-1/+1
|
* Don't try to load empty or non-existent startup scriptKevin Van Brunt2018-04-021-1/+1
|
* Added ability to query individual aliasKevin Van Brunt2018-04-021-0/+10
|
* Allow an alias name to match a command nameKevin Van Brunt2018-03-311-5/+0
|
* Fix unit testsTodd Leonhardt2018-03-191-0/+2
|
* Added unit tests for alias, unalias, and basic_completeKevin Van Brunt2018-03-161-0/+43
|
* Fixed unit testKevin Van Brunt2018-03-161-1/+2
|
* Added table_display.pyTodd Leonhardt2018-03-141-1/+1
| | | | | | | | Added example showing how to display tabular data in a cmd2 application. Also: - Updated CHANGELOG with data on all PRs since last release - Bumped version to 0.8.2 in preparation for next release
* Added option to cancel the current line on keyboard interrupt.Mark Lalor2018-03-121-0/+41
|
* Removed support for case-insensitive command parsingTodd Leonhardt2018-03-021-2/+1
|
* Added use of pytest-forked to CI unit test runsTodd Leonhardt2018-03-021-35/+0
| | | | | | | Due to apparent bugs in pyparsing, this can significantly speed up unit test execution. Also: - Removed use of pexpect in unit tests
* Added back the unit test of exclude_from_historyTodd Leonhardt2018-03-021-0/+24
|
* Fixed unit test on WindowsKevin Van Brunt2018-03-021-4/+4
|
* Removed abbrev attributeKevin Van Brunt2018-03-021-52/+4
|
* Flag the pexpect unit test of the persistent history to only run on macOSTodd Leonhardt2018-02-091-2/+3
| | | | | | - The Windows pexpect API is different from macOS or Linux - On Travis CI, the test behaves as if readline isn't working on those machines - The test runs fine when run on my system (on either macOS or Linux)
* Skip the pexpect-based unit test on Windows due to the pexpect API being ↵Todd Leonhardt2018-02-091-0/+2
| | | | different there
* Make sure pexpect uses same version of Python to spawn persistent history ↵Todd Leonhardt2018-02-091-4/+9
| | | | example
* Try increasing timeout to see if it fixes unit test on at least some platformsTodd Leonhardt2018-02-091-2/+2
|
* First past at unit test for persistent history featureTodd Leonhardt2018-02-091-0/+27
| | | | | | Added pexpect to modules required for running unit tests. This opens the door for carefully crafted complex unit tests to verify intricate behavior. Tests like this are somewhat painful to write and slow to execute. However, they can enable testing complicated interactive behavior that we otherwise probably would not be able to test.
* Added optional persistent readline history featureTodd Leonhardt2018-02-081-1/+1
| | | | | | | | | | | | - Including an example and info in the Sphinx docs Also: - Created CHANGELOG entry for 0.8.1 release - Added info to README about new sub-menu feature - Bumped version to 0.8.1 TODO: - Added a unit test for the persistent readline history feature
* help command temporarily redirects sys.stdout and sys.stderr to self.stdout ↵Todd Leonhardt2018-01-221-18/+12
| | | | | | | | for argparse commands In order to make "help" behave more consistently for decorated and undecorated commands, argparse output is temporarily redirected to self.stdout. So doing "help history" is similar to "help load". However, when using the "-h" with argparse commands without using the "help" command, the output from argparse isn't redirected to self.stdout. Fixing this would be rather difficult and would essentially involve creating a pyparsing rule to detect it at the parser level.
* Added links to docs and examples to CHANGELOG.mdTodd Leonhardt2018-01-201-1/+1
| | | | Also bumped version to 0.8.0.
* Fixed unit testsTodd Leonhardt2018-01-201-12/+22
| | | | Updated unit tests due to changes in how help is output for commands decorated with an argparse ArgumentParser.
* Cleanup of documentation and examplesTodd Leonhardt2018-01-171-7/+1
| | | | Removed usage of and reference to attributes and commands which have now been removed.
* do_edit() no longer edits history, just files #252kotfu2018-01-161-73/+0
|
* Remove do_save() and do_run() for #252kotfu2018-01-161-104/+4
|
* tweak unit tests for history #252kotfu2018-01-151-1/+1
|
* Implement -o, -r, and -e options for issue #252Jared Crapo2018-01-151-0/+47
|
* Fix test_base_show_readonly unit test on WindowsTodd Leonhardt2018-01-151-0/+1
|
* cmdenvironment command has been removed and its functionality now exists as ↵Todd Leonhardt2018-01-151-23/+22
| | | | a -a/--all option to the set command
* show command has been removedTodd Leonhardt2018-01-151-15/+13
| | | | | | It's functionality has been moved inside the set command. The set command now uses an argparse parser.
* Made test_echo unit test robust to changes in expected value of "help history"Todd Leonhardt2018-01-151-1/+1
|
* __relative_load command is now hidden from help menu by defaultTodd Leonhardt2018-01-151-2/+2
|
* Made a couple cleanup changesTodd Leonhardt2018-01-151-2/+3
| | | | | | | | | 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
* Fixed base_invalid_option unit testTodd Leonhardt2018-01-151-3/+2
| | | | argparse output for invalid option has different text and goes to stderr
* Fixed test_echo unit testTodd Leonhardt2018-01-151-1/+1
| | | | This one depends on the help text for history
* Enabled Python 3.7 testing on Travis CITodd Leonhardt2018-01-061-1/+1
| | | | Also bumped version to 0.8.0a
* Updating version and changelog in preparation for minor bug fix realeaseTodd Leonhardt2018-01-041-1/+1
|
* Bump version to 0.7.9aTodd Leonhardt2017-11-151-1/+1
| | | | To distinguish it from the previous or next release