|
1 | 1 | r""" |
2 | 2 | Features for testing the presence of Python modules in the Sage library |
3 | 3 |
|
4 | | -All of these features are present in a monolithic installation of the Sage library, |
5 | | -such as the one made by the SageMath distribution. |
6 | | -
|
7 | | -The features are defined for the purpose of separately testing modularized |
8 | | -distributions such as :ref:`sagemath-categories <spkg_sagemath_categories>` |
9 | | -and :ref:`sagemath-repl <spkg_sagemath_repl>`. |
| 4 | +All of these features are present in a monolithic installation of the |
| 5 | +Sage library, such as the one made by the SageMath distribution. |
10 | 6 |
|
11 | 7 | Often, doctests in a module of the Sage library illustrate the |
12 | | -interplay with a range of different objects; this is a form of integration testing. |
13 | | -These objects may come from modules shipped in |
14 | | -other distributions. For example, :mod:`sage.structure.element` |
15 | | -(shipped by :ref:`sagemath-objects <spkg_sagemath_objects>`, |
16 | | -one of the most fundamental distributions) contains the |
17 | | -doctest:: |
18 | | -
|
19 | | - sage: G = SymmetricGroup(4) # needs sage.groups |
20 | | - sage: g = G([2, 3, 4, 1]) # needs sage.groups |
21 | | - sage: g.powers(4) # needs sage.groups |
| 8 | +interplay with a range of different objects; this is a form of |
| 9 | +integration testing:: |
| 10 | +
|
| 11 | + sage: G = SymmetricGroup(4) |
| 12 | + sage: g = G([2, 3, 4, 1]) |
| 13 | + sage: g.powers(4) |
22 | 14 | [(), (1,2,3,4), (1,3)(2,4), (1,4,3,2)] |
23 | 15 |
|
24 | | -This test cannot pass when the distribution :ref:`sagemath-objects <spkg_sagemath_objects>` |
25 | | -is tested separately (in a virtual environment): In this situation, |
26 | | -:class:`SymmetricGroup` is not defined anywhere (and thus not present |
27 | | -in the top-level namespace). |
28 | | -Hence, we conditionalize this doctest on the presence of the feature |
29 | | -:class:`sage.groups <sage__groups>`. |
30 | 16 | """ |
31 | 17 |
|
32 | 18 | # ***************************************************************************** |
|
0 commit comments