testbook icon indicating copy to clipboard operation
testbook copied to clipboard

Documentation for `inject` function

Open rohitsanj opened this issue 5 years ago โ€ข 0 comments

Something along the lines of the following text, with some examples too.

  • pass in run=False (default is True) to not execute the cell as soon as it is injected
  • pass in pop=True (default is False) to pop the cell off after execution, this is useful in cases where you would want to execute the entire notebook (or range of cells) again but not including the injected cell.
  • pass in before or after arguments to inject the cells in a particular location in the notebook. Useful when used with run=False.

Note that inject appends a cell and runs it by default.

Originally posted by @rohitsanj in https://github.com/nteract/testbook/issues/72#issuecomment-731706758

rohitsanj avatar Nov 22 '20 06:11 rohitsanj