summaryrefslogtreecommitdiff
path: root/tests/conftest.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'macro' into argparse_conversionKevin Van Brunt2018-09-281-3/+2
|\
| * Addressing code review commentsKevin Van Brunt2018-09-281-3/+2
| |
* | Merge branch 'macro' into argparse_conversionKevin Van Brunt2018-09-271-3/+1
|\ \ | |/
| * Made _func_named() more reliableKevin Van Brunt2018-09-271-3/+1
| | | | | | | | Added unit tests
* | Converted help to argparseKevin Van Brunt2018-09-261-1/+1
| |
* | Tweaked help textKevin Van Brunt2018-09-261-5/+5
| |
* | Merge branch 'macro' into argparse_conversionKevin Van Brunt2018-09-261-13/+5
|\ \ | |/
| * Merge branch 'master' into macroKevin Van Brunt2018-09-261-12/+4
| |\
| | * Merged master in to colorize and resolved conflictsTodd Leonhardt2018-09-241-22/+4
| | |\
| | * \ Merge branch 'master' into colorizeTodd Leonhardt2018-09-211-6/+7
| | |\ \
| | * | | cmd2.Cmd.__init__ now initializes colorama and tells it to never strip ANSI ↵Todd Leonhardt2018-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | codes since cmd2 deals with that Also: - Finished editing poutput(), ppaged(), and pfeedback() methods to strip ANSI color when appropriate - Changed attr.ib() factory usage so cmd2 is compatible with older versions of attrs
| | * | | Merged master into colorize branchTodd Leonhardt2018-09-121-8/+8
| | |\ \ \
| | * \ \ \ Merged master in and resolved conflictsTodd Leonhardt2018-09-041-4/+4
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | @kotfu - I hope this doesn't screw you up, but I wanted to minimize some of the merge pain that will likely be coming up soon
| | * | | | | First pass at improved colorizingkotfu2018-08-111-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - colors setting now allows Always, Terminal, Never values - poutput() and perror() honor these new settings
| * | | | | | Updated documentationKevin Van Brunt2018-09-261-2/+2
| | | | | | |
* | | | | | | First steps in converting all commands to argparseKevin Van Brunt2018-09-261-8/+8
|/ / / / / /
* | | | | | Fixing unit testsKevin Van Brunt2018-09-251-5/+5
| |_|_|_|/ |/| | | |
* | | | | Fixed several hack classes build to simulate file descriptorsTodd Leonhardt2018-09-231-18/+4
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Removed remaining type hints in docstringsKevin Van Brunt2018-09-211-6/+7
| |_|/ |/| |
* | | Docstring updatesKevin Van Brunt2018-09-091-8/+8
| |/ |/|
* | ACHelpFormatter now inherits from argparse.RawTextHelpFormatter to make it ↵Kevin Van Brunt2018-08-241-4/+4
|/ | | | easier to format help/description text
* Added --clear argument to history commandKevin Van Brunt2018-07-111-3/+4
| | | | | | Added better error checking when loading readline history file Improved some error messages Changed IOError usages to OSError since they were merged in Python 3.3.
* Standardize cmd2 imports in tests and exampleskotfu2018-05-231-1/+1
|
* Merge branch 'bash_completion' into bash_to_pyscriptEric Lin2018-05-021-1/+1
|\
| * Removed the expensive imports from cmd2/__init__.pyEric Lin2018-04-251-1/+1
| | | | | | | | | | | | | | 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
* | Restored legacy cmd/self access when locals_in_py is True. Changed default ↵Eric Lin2018-05-021-2/+2
|/ | | | to False
* Adjusted some coverage configuration. Found and fixed bug in help completion.Eric Lin2018-04-181-0/+47
|
* Added a with_category decorator that can be used to tag a command category.Eric Lin2018-04-111-1/+0
| | | | | | | | | 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-0/+18
| | | | | | | | 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
* Fixing unit testsKevin Van Brunt2018-03-161-1/+2
|
* Removed abbrev attributeKevin Van Brunt2018-03-021-3/+1
|
* History enhancementsTodd Leonhardt2018-01-201-3/+5
| | | | | | | | | | History changes: - Unknown commands are no longer saved in the history - history command now has a -t option to generate a transcript based on commands in the history Also: - Moved examples transcripts from examples to examples/transcripts - Added a new transcript for use with the pirate.py example
* Fixed unit testsTodd Leonhardt2018-01-201-1/+0
| | | | Updated unit tests due to changes in how help is output for commands decorated with an argparse ArgumentParser.
* Improved how new argparse-based decorators provide helpTodd Leonhardt2018-01-171-1/+1
| | | | | | Now "help command_name" and "command_name -h" provide exactly the same text. The function docstring for the "do_*" command sets and overrides the ArgumentParser "description" if the docstring is not empty.
* do_edit() no longer edits history, just files #252kotfu2018-01-161-2/+0
|
* Remove do_save() and do_run() for #252kotfu2018-01-161-1/+1
|
* Implement -o, -r, and -e options for issue #252Jared Crapo2018-01-151-3/+4
|
* cmdenvironment command has been removed and its functionality now exists as ↵Todd Leonhardt2018-01-151-2/+1
| | | | a -a/--all option to the set command
* show command has been removedTodd Leonhardt2018-01-151-1/+1
| | | | | | It's functionality has been moved inside the set command. The set command now uses an argparse parser.
* Fixed expected value of "help history" for unit testsTodd Leonhardt2018-01-151-9/+13
|
* __relative_load command is now hidden from help menu by defaultTodd Leonhardt2018-01-151-2/+2
|
* Fixed do_history unit tests and implementationTodd Leonhardt2018-01-151-9/+10
|
* feedback_to_output now defaults to FalseTodd Leonhardt2017-08-201-13/+13
| | | | 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 unit testKevin Van Brunt2017-07-191-1/+1
|
* Fixed a few bugs and examplesTodd Leonhardt2017-07-031-4/+2
| | | | | | | | | | | | | | 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-2/+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.
* Completely removed use of self.default_file_nameTodd Leonhardt2017-06-281-16/+15
| | | | | | | | Load and relative load now require a file path Edit will use a temporary file by default and delete it when done Save will use a temporary file by default and inform the user what it is Also changed the default value for autorun_on_edit to False so that it can safely be used as an actual file editor.
* Added new pyscript commandTodd Leonhardt2017-06-131-2/+2
| | | | | | | | This command is explicitly for running Python script files within an embedded Python interpreter. The advantages over the py command with "run" are: - Tab-completion of file system paths is supported - Command-line arguments can be passed to the Python script
* Removed redundant list commandTodd Leonhardt2017-06-031-3/+4
| | | | | | | | The extra functionality of listing a span (slice) of history items present in the list command has been incorporated into the existing history command and the list command has been removed. Unit tests have been updated accordingly. In the process a bug was fixed that was causing a crash if and end was supplied to the span but not a start.
* Added "exclude_from_help" list as a cmd2.Cmd public attributeTodd Leonhardt2017-06-011-2/+2
| | | | | | | | Added a list of commands to explicitly exclude displaying in the help menu of commands which detailed help can be retrieved for. By default, only "do_eof" is in this list since that isn't a command which is ever intended for an end user to directly enter on the command line. Also updated unit tests to reflect new default help menu.