taucmdr
taucmdr copied to clipboard
Renumber fails if compressing gaps
When deleting trials and then trying to compress the gaps, an error message is thrown:
$ tau trial list -s
0
10
20
30
$ tau trial renumber 10 --to 1
['10', '--to', '1']
usage: {'prog': 'tau trial renumber'} [trial_number...] --to [new_trial_number...]
tau trial renumber: error: This renumbering would delete trial 1. If you would like to delete this trial use the `trial delete` subcommand.
I have created an extra unit test that should catch this.
See https://travis-ci.org/ParaToolsInc/taucmdr/builds/376030856#L3317 for an example.
To run tests locally the best way to do this is:
- Install TAU Commander (any version, just so that you get miniconda and the various packages)
- Set miniconda at the front of your path:
export PATH="$INSTALLDIR/conda/bin:$PATH"
- Make sure you you are using miniconda's executables:
which pip ; which python
- Install development packages (if not gathering coverage data or building sphynx docs this probably is not required)
pip install -r requirements.txt
- Run the tests:
python setup.py test
EDIT: Comment moved to it's own new issue