#8790 closed enhancement (fixed)
improve doctest coverage of logic/logic.py
Reported by: | mvngu | Owned by: | mvngu |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | documentation | Keywords: | beginner doctest documentation |
Cc: | rws | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
As the subject says. Currently, the coverage of sage/logic/logic.py
in Sage 4.4 is:
[mvngu@sage sage-4.4]$ ./sage -coverage devel/sage-main/sage/logic/logic.py ---------------------------------------------------------------------- devel/sage-main/sage/logic/logic.py ERROR: Please add a `TestSuite(s).run()` doctest. SCORE devel/sage-main/sage/logic/logic.py: 16% (3 of 18) Missing documentation: * combine(self, statement1, statement2): see #15262 * simplify(self, table): * prove(self, statement): Missing doctests: * get_bit(x, c): * eval(toks): * eval_ltor_toks(lrtoks): * reduce_bins(lrtoks): * reduce_monos(lrtoks): * eval_mon_op(args): * eval_bin_op(args): * eval_and_op(lval, rval): * eval_or_op(lval, rval): * eval_ifthen_op(lval, rval): * eval_iff_op(lval, rval): * tokenize(s, toks):
This needs to be coordinated with #8797.
Attachments (2)
Change History (15)
comment:1 Changed 11 years ago by
- Description modified (diff)
comment:2 Changed 8 years ago by
- Keywords beginner doctest documentation added
comment:3 Changed 8 years ago by
- Milestone changed from sage-5.11 to sage-5.12
Changed 8 years ago by
comment:4 Changed 8 years ago by
Functions simplify
, combine
and prove
are actually not implemented: the code is a stub. Patch sage-issue-8790-not-implemented.diff
provides a docstring stating that.
I'm not sure how doctests should be provided here: one could probably change the code to raise a NotImplemented
exception and look for that in the doctest.
comment:5 Changed 8 years ago by
The get_bits
, eval_*
, reduce_*
and tokenize
functions are
explictly described as "for internal use only". It is inconvenient to
provide a doctest for them, as arguments are the internal
data structures used in the SymbolicLogic
class.
Patch sage-issue-8790-module-private-funcs.diff
renames the functions to begin with an underscore to make their
non-public nature more evident, in the hope to silence the coverage
warning.
comment:6 Changed 8 years ago by
fix for the combine function #15262
comment:7 Changed 7 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:8 Changed 7 years ago by
- Cc rws added
- Description modified (diff)
comment:9 Changed 7 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:10 Changed 7 years ago by
- Milestone changed from sage-6.3 to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
I get
./sage --coverage src/sage/logic/logic.py ------------------------------------------------------------------------ SCORE src/sage/logic/logic.py: 100.0% (18 of 18) ------------------------------------------------------------------------
comment:11 Changed 7 years ago by
- Status changed from needs_review to positive_review
comment:12 Changed 7 years ago by
- Resolution set to fixed
- Status changed from positive_review to closed
comment:13 Changed 6 years ago by
- Description modified (diff)
Add docstring to functions
combine
,simplify
andprove
.