argh / tests.py

The branch '18-version-attribute' does not exist.
Author Commit Message Labels Comments Date
Andy Mikhailenko avatarAndy Mikhailenko
Added shortcut function `dispatch_commands`.
Andy Mikhailenko avatarAndy Mikhailenko
Added dispatch_command() shortcut function. Added documentation. This finally fixes #6.
Branches
6-default-command
Andy Mikhailenko avatarAndy Mikhailenko
Re #6: added a basic test and the relevant code for a default command for the root parser. It seems that everything is fine but we need to check for conflicts, etc.
Branches
6-default-command
Andy Mikhailenko avatarAndy Mikhailenko
BACKWARDS-INCOMPATIBLE. Added support for Python 3.x. Dropped support for Python ≤ 2.5. Included Benjamin Peterson's library "six" to keep the code clean while Python 2.x/3.x-compatible. Updated documentation.
Andy Mikhailenko avatarAndy Mikhailenko
Removed unused imports.
Andy Mikhailenko avatarAndy Mikhailenko
Fixed #12: the @command decorator would break on 2+ arguments which names start with the same character.
Andy Mikhailenko avatarAndy Mikhailenko
Added decorator wrap_errors(). Improved error wrapping in dispatcher. Added license headers. Bumped version.
mel avatarmel
allow using custom namespace objects:
Andy Mikhailenko avatarAndy Mikhailenko
Added dispatch argument `output_file` (issue #10), deprecated argument `intercept`. Added tests.
Andy Mikhailenko avatarAndy Mikhailenko
Added bash completion for commands. Options are not yet supported. User needs to bind completion to certain script name (to be documented). Tests are provided (for internal API only).
Andy Mikhailenko avatarAndy Mikhailenko
Added support for Python 2.5 (this fixes issue #5).
Andy Mikhailenko avatarAndy Mikhailenko
Rearranged the code. Added test for @alias decorator. Removed the previously deprecated decorator @generator.
Andy Mikhailenko avatarAndy Mikhailenko
Deprecated the @generator decorator because isinstance() is enough. Added tests for confirm() helper. Added documentation.
Andy Mikhailenko avatarAndy Mikhailenko
Removed option "print_result" from function dispatch(). Fixed bug in type inferring, added regression test.
Andy Mikhailenko avatarAndy Mikhailenko
Fixed typo.
Andy Mikhailenko avatarAndy Mikhailenko
Okay, now 100% covered with tests. Of course there could be more tests but the library is just a thin wrapper around argparse which has lots of tests.
Andy Mikhailenko avatarAndy Mikhailenko
Added tests (97% coverage), argh now passes them all.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.