Opened 4 years ago
Closed 4 years ago
#27117 closed enhancement (fixed)
Doctest Jupyter implementation of interact library
Reported by: | jdemeyer | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.7 |
Component: | doctest framework | Keywords: | |
Cc: | chapoton | Merged in: | |
Authors: | Jeroen Demeyer | Reviewers: | Frédéric Chapoton |
Report Upstream: | N/A | Work issues: | |
Branch: | dec85b1 (Commits, GitHub, GitLab) | Commit: | dec85b1c14fe0d47f91196ac825c5935949166b3 |
Dependencies: | Stopgaps: |
Description
The file src/sage/interacts/library.py
has this snippet:
# Get a bunch of functions from the user globals. In SageNB, this will # refer to SageNB functions; in Jupyter, this will refer to Jupyter # functions. In the command-line and for doctests, we import the # SageNB functions as fall-back. for name in ("interact", "checkbox", "input_box", "input_grid", "range_slider", "selector", "slider", "text_control"): try: obj = get_global(name) except NameError: import sagenb.notebook.interact obj = sagenb.notebook.interact.__dict__[name] globals()[name] = obj
In other words, the doctest framework is testing the SageNB implementation of widgets. This should instead default to using the Jupyter implementation.
Change History (9)
comment:1 Changed 4 years ago by
- Branch set to u/jdemeyer/doctest_jupyter_implementation_of_interact_library
comment:2 Changed 4 years ago by
- Commit set to d6bfd45a050c46ce41e0cf61a4b14242e305a27e
- Status changed from new to needs_review
comment:3 follow-up: ↓ 5 Changed 4 years ago by
- Status changed from needs_review to needs_work
easy doctest failures in
- src/sage/plot/plot3d/plot3d.py and
- src/sage/graphs/graph_database.py
comment:4 Changed 4 years ago by
- Commit changed from d6bfd45a050c46ce41e0cf61a4b14242e305a27e to dec85b1c14fe0d47f91196ac825c5935949166b3
comment:5 in reply to: ↑ 3 Changed 4 years ago by
- Status changed from needs_work to needs_review
Replying to chapoton:
easy doctest failures in
- src/sage/plot/plot3d/plot3d.py
Fixed.
- src/sage/graphs/graph_database.py
In this case, I removed the offending doctests. Part of it was copied verbatim from a different doctest and the rest wasn't really adding any value as test. Note that this code is sagenb-specific, so it cannot be run on Jupyter anyway.
comment:6 follow-up: ↓ 7 Changed 4 years ago by
looks good, but this may interfere with #27126
comment:7 in reply to: ↑ 6 Changed 4 years ago by
comment:8 Changed 4 years ago by
- Reviewers set to Frédéric Chapoton
- Status changed from needs_review to positive_review
indeed. Sorry for the noise. Then let it be.
comment:9 Changed 4 years ago by
- Branch changed from u/jdemeyer/doctest_jupyter_implementation_of_interact_library to dec85b1c14fe0d47f91196ac825c5935949166b3
- Resolution set to fixed
- Status changed from positive_review to closed
New commits:
Doctest Jupyter implementation of interact library