-
-
Notifications
You must be signed in to change notification settings - Fork 545
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix more doctests in meson_editable install
- Loading branch information
1 parent
766c7a0
commit 40c0b19
Showing
5 changed files
with
98 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
r""" | ||
Feature for testing if Meson editable install is used. | ||
""" | ||
|
||
import sys | ||
from . import Feature, FeatureTestResult | ||
|
||
|
||
class MesonEditable(Feature): | ||
r""" | ||
A :class:`~sage.features.Feature` describing if Meson editable install is used. | ||
EXAMPLES:: | ||
sage: from sage.features.meson_editable import MesonEditable | ||
sage: MesonEditable() | ||
Feature('meson_editable') | ||
""" | ||
def __init__(self): | ||
r""" | ||
TESTS:: | ||
sage: from sage.features.meson_editable import MesonEditable | ||
sage: MesonEditable() is MesonEditable() | ||
True | ||
""" | ||
Feature.__init__(self, 'meson_editable') | ||
|
||
def _is_present(self): | ||
r""" | ||
Test whether Meson editable install is used. | ||
EXAMPLES:: | ||
sage: from sage.features.meson_editable import MesonEditable | ||
sage: Internet()._is_present() # random | ||
Check failure on line 36 in src/sage/features/meson_editable.py
|
||
FeatureTestResult('meson_editable', True) | ||
""" | ||
import sage | ||
import sys | ||
result = type(sage.__loader__).__module__ == '_sagemath_editable_loader' | ||
return FeatureTestResult(self, result) | ||
|
||
|
||
def all_features(): | ||
return [MesonEditable()] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters