nteract / testbook

🧪 📗 Unit test your Jupyter Notebooks the right way
https://testbook.readthedocs.io
BSD 3-Clause "New" or "Revised" License
416 stars 37 forks source link

Return actual object instead of reference object in cases where the value is JSON serializable #94

Closed rohitsanj closed 3 years ago

rohitsanj commented 3 years ago
# in notebook.ipynb
var = [1, 2, 3]

# in test.py
var = tb["var"]
type(var) # TestbookObjectReference

# instead, we want the following behaviour
var = tb["var"]
type(var) # list

We will need to include a note about this in the docs. Also, we might want to migrate all tb.ref('var') usages to tb['var'] in the docs.

Originally requested by @aakashns