Updates:
        Summary: Remove #doctest: +SKIP where possible
        Status: Valid
        Labels: Testing

Comment #1 on issue 3860 by asmeu...@gmail.com: Remove #doctest: +SKIP where possible
http://code.google.com/p/sympy/issues/detail?id=3860

Here is a copy of the list:

So looking through `git grep -A 3 "doctest: +SKIP"`, it looks like we still skip the following:

1. Stuff using floats
2. Anything using integer division (output is dependent on whether or not `from __future__ import division` has been run). 3. Anything using the with statement (similar to previous point: `__future__` imports do not work in doctests).
4. Stuff in rst files requiring dependencies.
5. Randomized output.
6. Stuff that doesn't work yet (like in the docstring of `ask`). I guess the still skipped pyglet plotting of constants would also fall into this category. 7. Stuff whose output might differ depending on environment (esp. Python 2 vs. Python 3), and using ellipses would make the output confusing. 8. Things that you didn't put `@depends_on` on yet. These include `preview_diagram` in the categories module, some plotting in geometry, `symarray` in matrices,
9. Stuff that I'm not sure about. For example,

- From permutations

```py
[[1, 2]]*[[2, 3]]*Permutation([]) # doctest: +SKIP
```

- In basic:

```py
list(preorder_traversal((x + y)*z, keys=None)) # doctest: +SKIP
[z*(x + y), z, x + y, y, x]
```

- In expr

```py
Sum(x, (x, 1, n)).is_constant()  # doctest: +SKIP
False
Sum(x, (x, 1, n)).is_constant(y)
True
Sum(x, (x, 1, n)).is_constant(n) # doctest: +SKIP
False
Sum(x, (x, 1, n)).is_constant(x)
True
```

- From relational:

```py
e #doctest: +SKIP
y < z
```

- A bunch of doctests in functions.miscellaneous like

```py
Max(x, -2)                  #doctest: +SKIP
Max(x, -2)
```

(I think that's just a leftover from when printing ordering depended on hashing.)

- Everything in the docstring of `init_printing`. I'm sure there was a good reason for that, though (maybe it messes up doctest globally). Ditto for `init_session`.

- Several doctests in secondquant that look fine, like

```py
FKet([1, 2]) #doctest: +SKIP
FockStateFermionKet((1, 2))
```

- In printers

```py
print_tree(x**2) # doctest: +SKIP
Pow: x**2
+-Symbol: x
| comparable: False
```

- Several doctests in the ODE module (possibly because they are too slow).

- From stats

```py
 >>> simplify(variance(X, meijerg=True))  #doctest: +SKIP
 alpha*beta/((alpha + beta)**2*(alpha + beta + 1))
```

- From iterables

```py
list(postorder_traversal(w + (x + y)*z)) # doctest: +SKIP
[z, y, x, x + y, z*(x + y), w, w + z*(x + y)]
```
(wait, why is `preorder_traversal` in the core and `postorder_traversal` in iterables?)

- In tensor

```py
get_indices(x[i] + y[j])                #doctest: +SKIP
        (...)
IndexConformanceException: Indices are not consistent: x(i) + y(j)
```
(this would actually work if it didn't have the parentheses)

10. Stuff that you literally can't doctest. For example, the doctests in `test` and `doctest`. Also `clock`.

11. mpmath stuff

For 1, there's no good way around it, so I think we should just leave it alone. We might patch the doctest runner in the future to fix this. Alternately, change the doctests to use Float, which is more consistant with printing from my understanding.

For 2 and 3, if we can figure out how to make `__future__` imports work with the doctester, we can uncomment most of these. Also for 3 when we drop Python 2.5 support we can unskip those.

For 4, we should extend the work in this pull request to support some Sphinx comment. But this would be more work, because as far as I can tell, the doctester doesn't parse rst files any different than regular .py files. It just looks for `>>>` and runs them.

For 5, we could set a global seed in the doctester. Or just extend `@depends_on` to allow a seed to be set.

For 6, if it's not implemented yet, it's fine. If it's a bug, we should fix it (or at least open an issue for it).

For 7, some of them are fine, but we should do an audit. Some instances look like they are just exceptions, which can be handled fine by just putting `...` on a blank line before the exception.

For 8, let's fix that here.

For 9, we need to do an audit here too.

For 10 and 11, just leave them alone.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy-issues+unsubscr...@googlegroups.com.
To post to this group, send email to sympy-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to