Status: Accepted
Owner: asmeurer
Labels: Type-Defect Priority-Critical Milestone-Release0.7.0 Documentation
New issue 2041 by asmeurer: Doctest failures in Python 2.6.6
http://code.google.com/p/sympy/issues/detail?id=2041
See
http://groups.google.com/group/sympy/browse_thread/thread/de060bae007f0acb
for more information. The issue is that in Python 2.6.6, there are doctest
failures that do not exist in any other Python (including Python 2.6.5). I
have attached a file with all the failures. An example of some of the
failures is:
________________________________________________________________________________
_________________ sympy.assumptions.assume.AssumptionsContext
__________________
File "/Users/aaronmeurer/Documents/python/sympy/sympy-scratch2/sympy/assumptions/assume.py",
line
15, in sympy.assumptions.assume.AssumptionsContext
Failed example:
global_assumptions
Expected:
AssumptionsContext()
Got:
AssumptionsContext([])
**********************************************************************
File "/Users/aaronmeurer/Documents/python/sympy/sympy-scratch2/sympy/assumptions/assume.py",
line
22, in sympy.assumptions.assume.AssumptionsContext
Failed example:
global_assumptions
Expected:
AssumptionsContext()
Got:
AssumptionsContext([])
________________________________________________________________________________
_________________________ sympy.core.basic.Basic.match
_________________________
File "/Users/aaronmeurer/Documents/python/sympy/sympy-scratch2/sympy/core/basic.py",
line
986, in sympy.core.basic.Basic.match
Failed example:
e.match(p**q)
Expected:
{p_: x + y, q_: x + y}
Got:
{q_: x + y, p_: x + y}
**********************************************************************
And there are more. The problem is that if you change the doctest to give
what Python 2.6.6 wants, it will fail everywhere else. For example, right
now
$python2.7 bin/doctest sympy/assumptions/assume.py
passes, while
$python2.6.6 bin/doctest sympy/assumptions/assume.py
fails. But if you apply
diff --git a/sympy/assumptions/assume.py b/sympy/assumptions/assume.py
index f87d44f..0e31611 100644
--- a/sympy/assumptions/assume.py
+++ b/sympy/assumptions/assume.py
@@ -13,14 +13,14 @@ class to create your own local assumptions contexts. It
is basically a thin
Examples:
>>> from sympy import global_assumptions, Assume, Q
>>> global_assumptions
- AssumptionsContext()
+ AssumptionsContext([])
>>> from sympy.abc import x
>>> global_assumptions.add(Assume(x, Q.real))
>>> global_assumptions
AssumptionsContext([Assume(x, Q.real)])
>>> global_assumptions.remove(Assume(x, Q.real))
>>> global_assumptions
- AssumptionsContext()
+ AssumptionsContext([])
>>> global_assumptions.clear()
"""
Then
$python2.6.6 bin/doctest sympy/assumptions/assume.py
passes while
$python2.7 bin/doctest sympy/assumptions/assume.py
fails. So I do not know how to fix these things. By the way, the failures
in Python 2.6.6 release are exactly the same as the ones I attached to the
above named email to the mailing list from Python 2.6.6 rc1.
Attachments:
python2.6.6_release_failures.txt 29.0 KB
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.