summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Added a unit test and updated changesTodd Leonhardt2017-05-211-1/+7
|
* Fixed a hard-coded path separatorTodd Leonhardt2017-05-181-1/+1
| | | | | | Fixed a bug where a path separator was hard-coded as ":" and replaced it with os.path.pathsep Also changed version from 0.7.1a to 0.7.1 in preparation for upcoming release.
* Fixed transcript testing issuesTodd Leonhardt2017-04-264-13/+12
| | | | | | Transcript testing no longer creates an unnecessary 2nd instance of the class derived from cmd2.Cmd. This dramatically simplifies transcript testing for derived classes which have required parameters during construction. As a side effect the, feedback_to_output attribute now defaults to false. This had some minor ripple effects on various unit tests.
* Apparently regex syntax is stricter for Python 3 on Windows.Todd Leonhardt2017-03-161-1/+1
| | | | | | Than it is for Python 2 on Windows or Python 3 on Linux or Mac. Go figure. You would think it would be the same for Python 3 across platforms.
* Added a regex to transcript for color because its not present on Windows.Todd Leonhardt2017-03-161-2/+2
|
* Added example of using a regular expression in a transcript test.Todd Leonhardt2017-03-162-0/+44
| | | | Also added a unit test for this feature.
* Mostly fix a bunch of spelling mistakes.Todd Leonhardt2017-03-134-10/+16
| | | | A few other miscellaneous minor tweaks for whitespace and such.
* Fixed typoTodd Leonhardt2017-03-131-1/+1
|
* Travis CI changesTodd Leonhardt2017-03-131-1/+2
| | | | | | - Remove Python 2.6 and 3.2 builds because they don't work and aren't worth fixing - Attempt at fixing pypy3 unit test that fails - First attempt at building for Python 3 on Mac OS X
* Finished code cleanup for nowTodd Leonhardt2017-03-121-6/+6
|
* Parsing unit tests are now largely decoupled from pyparsing implementation ↵Todd Leonhardt2017-02-251-386/+133
| | | | details.
* Added unit tests for parsing unicode characters on the command line.Todd Leonhardt2017-02-241-5/+69
| | | | These tests only run with Python 3 because cmd2 does not attempt to support unicode with Python 2.
* Removed an unused importTodd Leonhardt2017-02-241-1/+0
|
* Stopped skipping a test on Linux TravisCI since it should now always passTodd Leonhardt2017-02-241-2/+0
|
* Added "-" to the list of legal characters.Todd Leonhardt2017-02-241-7/+27
| | | | | | This is a fix for Issue #55. Updated a couple unit tests accordingly and also added a couple new unit tests to make sure this logic is appropriately covered.
* Added a couple unit tests for self.inputParser.Todd Leonhardt2017-02-241-0/+22
| | | | One passes and the other fails and demonstrates the overall problem with the failing unit test for input redirection on some systems where a "-" ends up in the path name.
* Bump version to 0.7.1aFederico Ceratto2017-02-231-1/+1
|
* Finsished porting old doctests to pytest unit tests.Todd Leonhardt2017-02-181-80/+158
| | | | This concludes the fix for Issue #43.
* Step 2 of porting doctest to pytest.Todd Leonhardt2017-02-171-56/+122
| | | | Partial fix for Issue # 43
* Converting doctests to pytestTodd Leonhardt2017-02-171-0/+281
| | | | | | Done with first stage. Still a lot more parsing tests to convert. It turns out the original problem wasn't a Python 2 vs Python 3 problem, but the fact that pyparsing changed the way the ParseResults.dump() command outputs strings - in version 2.1.10 it switched to putting strings in quotes.
* Added member boolean flag to disable output redirection and piping.Todd Leonhardt2017-02-161-4/+21
| | | | | | This addresses Issue #15. Also added a unit test for this new feature and display of it's status in the cmdenvironment command.
* Refactored to move all cmd2.Cmd class member variables to beginning.Todd Leonhardt2017-02-112-2/+5
| | | | | | | | Also: - Added locals_in_py to settable parameters to match documentation. - Added pycon2010 slides back into doc build since they are referenced with :doc: - Fixed some references in the documentation - Updated unit tests accordingly
* Fixed a typo and added a unit test.Todd Leonhardt2017-02-102-1/+10
|
* Various parsing fixes and improvements:TL2017-02-072-3/+5
| | | | | | | | 1) Built-in commands which use @options now properly deal with the USE_ARG_LIST boolean flag 2) Added an "autorun_on_edit" settable parameter which defaults to True to preserve backwards compatibility, but can be set False to prevent automatically running files as scripts when the editor closes 3) Improved how piping works so it can deal with commands which output a large amount of data
* Experiment with different modes of parsing command-line arguments for option ↵Todd Leonhardt2017-02-061-1/+1
| | | | | | | | commands. This is an experiment with usin non-POSIX parsing of the command line with shlex before passing it to the optparse OptionParser. The posix vs non-posix setitng primarily effects how quotes and escape characters are dealt with. I'm experimenting with various options to see what may feel the most natural for the majority of end users.
* Fix a unit test on WindowsTodd Leonhardt2017-02-051-1/+1
|
* Documented undocumented commands and removed command aliases.Todd Leonhardt2017-02-054-23/+8
| | | | | | | | The out-of-the-box help menu now looks a lot cleaner: - All redundant command aliases have been removed (NOTE: They can still be used if self.abbrev is True, which is the default) - All previously undocumented commands have been documented - Unit tests and README.rst documentation has been updated to reflect new behavior
* Use older form of invoking super class ctor for Py2/3 compatibility.Todd Leonhardt2017-02-051-1/+2
|
* Fixed flaw in unit tests so they can be reliably parallelized.Todd Leonhardt2017-02-051-9/+6
| | | | | | | | Fixed a bug which made parallelizing the unit tests with pytest-xdist unreliable. The unit tests can now be run in parallel using pytest-xdist for a dramatic speedup on multicore machines. To do this use: py.test -n4 (where 4 is the number of cores you wish to parallelize across)
* Added a couple more unit tests.Todd Leonhardt2017-02-053-0/+57
| | | | | One for transcript testing with multi-line commands and commments at the beginning. Another for cmdloop testing with use_rawinput = False
* Added more unit tests for list command.Todd Leonhardt2017-02-051-0/+39
| | | | Added list tests with string, integer, and integer span arguments
* Added unit test for doing transcript testing within the cmdloop.Todd Leonhardt2017-02-051-2/+31
|
* Re-ordered test skip condition.Todd Leonhardt2017-02-051-1/+1
| | | | Re-ordered boolean and so it should fail fast on Windows and not try to run the 2nd part which would cause issues.
* Fixed unit test skip condition.Todd Leonhardt2017-02-051-1/+2
| | | | The input redirection test which only fails on TravisCI Linux containers will now only be skipped if the user name is travis AND the OS is Linux (but will now be validly skipped for both Python 2 and 3).
* Marked one test to skip on Linux because it fails on the TravisCI Linux ↵Todd Leonhardt2017-02-051-0/+2
| | | | | | containers. But it works on both Ubuntu 16.04 and Debian 8.7.
* Added unit test for calling cmdloop without a queueTodd Leonhardt2017-02-051-8/+35
|
* Added unit test for redirecting input from a file using <Todd Leonhardt2017-02-052-1/+14
|
* Added unit test for cmdloop()Todd Leonhardt2017-02-051-1/+19
|
* Added unit test for the interactive form of do_py().Todd Leonhardt2017-02-052-1/+12
|
* Fixed how the six.moves.input function is imported and used.Todd Leonhardt2017-02-051-2/+31
| | | | Also added a unit test for the cmd2.Cmd.select() method.
* Fixed long-form show unit test to deal with Windows not having colors.Todd Leonhardt2017-02-041-3/+6
|
* Added unit test for "show -l".Todd Leonhardt2017-02-042-3/+27
|
* Added unit tests for the edit command.Todd Leonhardt2017-02-041-0/+84
| | | | With os.system() call mocked out to prevent actually opening an editor.
* Fix cut-and-paste mistakeTodd Leonhardt2017-02-041-1/+1
|
* Fix to colorize unit test for WindowsTodd Leonhardt2017-02-041-1/+5
|
* Added unit test of colorize() methodTodd Leonhardt2017-02-041-0/+12
|
* Added unit test of debug output capabilityTodd Leonhardt2017-02-041-0/+21
|
* Fixed timing unit test on Windows.Todd Leonhardt2017-02-041-1/+4
| | | | Very short time deltas look different on Windows that Linux/Mac due to poor timing resolution on Windows.
* Added unit test for optional command timing featureTodd Leonhardt2017-02-041-0/+9
|
* Told pytest to skip one unit test on Windows because getting the output was ↵Todd Leonhardt2017-02-041-0/+3
| | | | | | problematic. The feature does work on Windows though.