I suggested in #117 that it would be nice to be able to mark a cell for keeping output via the cell tags. Cell tags are easier to see and modify (if you set View > cell toolbar > tags).
I have implemented this functionality in this pull request. I include tests as well, though I do so with pure pytest instead of cram, because cram does not work on Windows and that's what I have at the moment. In the test fixtures (notebooks),
"keep_output": true as a top-level cell key still works, but I raise an exception if it has both "keep_output": falseand a keep_output tag, as that would be an explicit contradiction that the user should resolve.
Testing note: In my test fixtures I denote code cells as supposed to have (or not have) output using a comment line at the beginning of the code cell source. I specify the case where an exception should be raised also by a comment at the beginning of the corresponding code cell source.
I suggested in #117 that it would be nice to be able to mark a cell for keeping output via the cell tags. Cell tags are easier to see and modify (if you set View > cell toolbar > tags).
I have implemented this functionality in this pull request. I include tests as well, though I do so with pure
pytest
instead ofcram
, becausecram
does not work on Windows and that's what I have at the moment. In the test fixtures (notebooks),"keep_output": true
as a top-level cell key still works, but I raise an exception if it has both"keep_output": false
and akeep_output
tag, as that would be an explicit contradiction that the user should resolve.Testing note: In my test fixtures I denote code cells as supposed to have (or not have) output using a comment line at the beginning of the code cell source. I specify the case where an exception should be raised also by a comment at the beginning of the corresponding code cell source.