This commit was merged in pull request #105.
This commit is contained in:
@@ -18,16 +18,16 @@
|
||||
|
||||
## Context / problem
|
||||
|
||||
`python cli.py done 99` on a list with 3 tasks raises an uncaught `IndexError` and dumps a Python
|
||||
traceback. `python cli.py done abc` raises `ValueError` the same way. The user sees a stack trace
|
||||
`python3 cli.py done 99` on a list with 3 tasks raises an uncaught `IndexError` and dumps a Python
|
||||
traceback. `python3 cli.py done abc` raises `ValueError` the same way. The user sees a stack trace
|
||||
instead of a helpful message, and the process exits as if it crashed.
|
||||
|
||||
Reproduce:
|
||||
|
||||
```
|
||||
python cli.py add "first"
|
||||
python cli.py done 99 # IndexError traceback
|
||||
python cli.py done abc # ValueError traceback
|
||||
python3 cli.py add "first"
|
||||
python3 cli.py done 99 # IndexError traceback
|
||||
python3 cli.py done abc # ValueError traceback
|
||||
```
|
||||
|
||||
## Acceptance criteria
|
||||
@@ -61,7 +61,7 @@ command, which already takes an index and flips a task's state; this is simply i
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- [ ] `python cli.py undone <index>` clears the done flag on the task at that index and saves.
|
||||
- [ ] `python3 cli.py undone <index>` clears the done flag on the task at that index and saves.
|
||||
- [ ] `undone` with an out-of-range or non-integer index prints a clear error and exits non-zero
|
||||
(same behavior as the fixed `done`, see Issue 1).
|
||||
- [ ] `list` after `undone` shows that task as not done (`[ ]`).
|
||||
|
||||
Reference in New Issue
Block a user