https://github.com/python-cmd2/cmd2-submenu
Submenu
https://github.com/python-cmd2/cmd2-submenu
Last synced: 11 months ago
JSON representation
Submenu
- Host: GitHub
- URL: https://github.com/python-cmd2/cmd2-submenu
- Owner: python-cmd2
- License: mit
- Created: 2018-05-08T20:43:50.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-18T01:58:12.000Z (over 7 years ago)
- Last Synced: 2025-05-08T21:48:49.000Z (11 months ago)
- Language: Python
- Size: 26.4 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# cmd2-submenu
This project provides a submenu system for cmd2
## Installing
To install the plugin, do:
```
$ pip install cmd2-submenu
```
## How to use
## Running tests
`cmd2` uses a three tiered testing strategy to test on multiple versions
of python on various platforms. This plugin uses the same strategy:
- [pytest](https://pytest.org) runs the unit tests
- [tox](https://tox.readthedocs.io/) runs the unit tests on multiple versions
of python
- [AppVeyor](https://www.appveyor.com/) and [TravisCI](https://travis-ci.com)
run the tests on the various supported platforms
### Running unit tests
Run `pytest` from the top level directory of this plugin to run all the
unit tests.
### Use tox to run unit tests in multiple versions of python
The included `tox.ini` is setup to run the unit tests in python 3.4, 3.5,
and 3.6. In order for `tox` to work, you need to have different versions of
python executables available in your path.
[pyenv](https://github.com/pyenv/pyenv) is one method of doing this easily.
Once `pyenv` is installed, use it to install multiple versions of python:
```
$ pyenv install 3.4.8
$ pyenv install 3.5.5
$ pyenv install 3.6.5
$ pyenv local 3.6.5 3.5.5 3.4.8
```
This will create a `.python-version` file and instruct the `pyenv` shims
to make `python3.6`, `python3.5`, and `python3.4` launch the appropriate
versions of python.
Once these executables are configured, invoking `tox` will create a
virtual environment for each version of python, install the prerequisite
packages, and run your unit tests.