Opened 8 years ago
Last modified 7 years ago
#15158 needs_work defect
R doctests fail for no reason
Reported by: | felixs | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | sage-6.4 |
Component: | interfaces | Keywords: | r-project |
Cc: | Merged in: | ||
Authors: | Felix Salfelder | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | u/felixs/r_doctest (Commits, GitHub, GitLab) | Commit: | 628d5afab70880b7b7a24d3417d7ff996dbb816c |
Dependencies: | Stopgaps: |
Description
Whether or not a certain R version is installed, should not affect doctests, if R works as intended.
Change History (7)
comment:1 Changed 8 years ago by
- Status changed from new to needs_review
- Type changed from enhancement to defect
comment:2 follow-up: ↓ 3 Changed 8 years ago by
- Keywords r-project added
Can you be more elaborate about what you mean by this? The description is remarkably cryptic.
But I think you mean the function tested in the function changed (correctly) in #13686. There is a good reason to test this function; it's a function in Sage, so it needs to be doctested. Perhaps there is a nice clever way to test this without allowing just any old output like ((25,1,3), 'R version -3.2.x')
but that would need to be done, so we shouldn't remove the function. If that's not what you're implying, my apologies in advance.
comment:3 in reply to: ↑ 2 Changed 8 years ago by
Replying to kcrisman:
Can you be more elaborate about what you mean by this? The description is remarkably cryptic.
OK, I'll try.
But I think you mean the function tested in the function changed (correctly) in #13686.
The functions r_version
and version
in r.py
are affected, also source
and _source
, this seems unrelated to #13686.
There is a good reason to test this function; it's a function in Sage, so it needs to be doctested.
The return values depend on the R version that is called.
For example newer R has additional L
in the source. So in total, four doctests fail.
With this patch http://trac.sagemath.org/changeset?new=628d5afab70880b7b7a24d3417d7ff996dbb816c&base=728e542453259b59b7e012f382e141652671d425&old=c29a7554ab4cfd9f0d17a8a242558db5b820b12a#file36 they pass (how can I point to a commit from here?).
Perhaps there is a nice clever way to test this without allowing just any old output like
((25,1,3), 'R version -3.2.x')
If R is version -3.2.x, and version
returns that, everything works correctly, doesn't it?
but that would need to be done.
It's difficult to tell which version is present without a version
call... In which way would the other tests pass, if R is a wrong one?
so we shouldn't remove the function. If that's not what you're implying, my apologies in advance.
No, I dont want to remove the checks, just allow the extra L
and be a bit more tolerant about the version number.
comment:4 Changed 8 years ago by
- Status changed from needs_review to needs_work
Needs to be rebased.
comment:5 Changed 8 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:6 Changed 7 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:7 Changed 7 years ago by
- Milestone changed from sage-6.3 to sage-6.4
This is a defect, because sagelib is sometimes used outside ouf sage (the distribution). It will be a defect within sage (the distribution) as soon as R will not be built unconditionally (e.g. #14796).