Opened 11 years ago
Closed 11 years ago
#11236 closed defect (fixed)
Fix _test_eq for Python 2.7
Reported by: | nthiery | Owned by: | mvngu |
---|---|---|---|
Priority: | major | Milestone: | sage-4.7.1 |
Component: | doctest coverage | Keywords: | |
Cc: | Merged in: | sage-4.7.1.alpha0 | |
Authors: | Nicolas M. Thiéry | Reviewers: | François Bissey |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
In Python 2.7, AssertEqual? / AssertNonEqual? call directly == and != a bit differently. So in Parent._test_eq, one is better of calling explicitly != and ==.
Attachments (1)
Change History (10)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
sage -t -long -force_lib "devel/sage-main/sage/structure/parent.pyx" [21.7 s] ---------------------------------------------------------------------- All tests passed!
sage-on-gentoo 4.7.alpha5 with python-2.7.1. vanilla sage coming.
comment:3 Changed 11 years ago by
- Status changed from new to needs_review
Tested on vanilla sage (4.7.alpha1) and tests passed. Positive review from me.
comment:4 Changed 11 years ago by
- Status changed from needs_review to positive_review
comment:5 follow-up: ↓ 6 Changed 11 years ago by
- Status changed from positive_review to needs_work
Sorry not in my initial post because I missed it but sage/structure/element.pyx has exactly the same test and problem. I don't think there are any other instance but I'll check again. It looks so much the same that you would think the patch for parent.pyx would just apply with some fuzz.
Changed 11 years ago by
comment:6 in reply to: ↑ 5 Changed 11 years ago by
- Status changed from needs_work to needs_review
Replying to fbissey:
Sorry not in my initial post because I missed it but sage/structure/element.pyx has exactly the same test and problem. I don't think there are any other instance but I'll check again. It looks so much the same that you would think the patch for parent.pyx would just apply with some fuzz.
Voilà!
So much for me not finding a way to avoid the code duplication between Parent and Element :-)
comment:7 Changed 11 years ago by
That's great! It's a bit late in the day for me to test it but we'll probably be back at positive review tomorrow.
comment:8 Changed 11 years ago by
- Status changed from needs_review to positive_review
Ok it worked like a charm. Back to positive review.
comment:9 Changed 11 years ago by
- Merged in set to sage-4.7.1.alpha0
- Resolution set to fixed
- Status changed from positive_review to closed
I am doing a build of python-2.7 sage-4.7.alpha5 right now. I assume you tested that it was safe with python-2.6 (I will run a check on a vanilla install in any case).