Join features#

class sage.features.join_feature.JoinFeature(*args, **kwds)#

Bases: Feature

Join of several Feature instances.

This creates a new feature as the union of the given features. Typically these are executables of an SPKG. For an example, see Rubiks.

Furthermore, this can be the union of a single feature. This is used to map the given feature to a more convenient name to be used in optional tags of doctests. Thus you can equip a feature such as a PythonModule with a tag name that differs from the systematic tag name. As an example for this use case, see Meataxe.

EXAMPLES:

sage: from sage.features import Executable
sage: from sage.features.join_feature import JoinFeature
sage: F = JoinFeature("shell-boolean",
....:                 (Executable('shell-true', 'true'),
....:                  Executable('shell-false', 'false')))
sage: F.is_present()
FeatureTestResult('shell-boolean', True)
sage: F = JoinFeature("asdfghjkl",
....:                 (Executable('shell-true', 'true'),
....:                  Executable('xxyyyy', 'xxyyyy-does-not-exist')))
sage: F.is_present()
FeatureTestResult('xxyyyy', False)
is_functional()#

Test whether the join feature is functional.

This method is deprecated. Use Feature.is_present() instead.

EXAMPLES:

sage: from sage.features.latte import Latte
sage: Latte().is_functional()  # optional - latte_int
doctest:warning...
DeprecationWarning: method JoinFeature.is_functional; use is_present instead
See https://trac.sagemath.org/33114 for details.
FeatureTestResult('latte_int', True)