Skip to content

Commit

Permalink
is_package_or_sage_namespace_package_dir: Update more doctests after …
Browse files Browse the repository at this point in the history
…namespacification
  • Loading branch information
tornaria authored and Matthias Koeppe committed Mar 25, 2023
1 parent 5ee730d commit dc8b3c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sage/misc/package_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,22 +155,22 @@ def is_package_or_sage_namespace_package_dir(path, *, distribution_filter=None):
:mod:`sage.cpython` is an ordinary package::
sage: from sage.misc.package_dir import is_package_or_sage_namespace_package_dir
sage: directory = os.path.dirname(sage.cpython.__file__); directory
sage: directory = sage.cpython.__path__[0]; directory
'.../sage/cpython'
sage: is_package_or_sage_namespace_package_dir(directory)
True
:mod:`sage.libs.mpfr` only has an ``__init__.pxd`` file, but we consider
it a package directory for consistency with Cython::
sage: directory = os.path.join(os.path.dirname(sage.libs.all.__file__), 'mpfr'); directory
sage: directory = os.path.join(sage.libs.__path__[0], 'mpfr'); directory
'.../sage/libs/mpfr'
sage: is_package_or_sage_namespace_package_dir(directory)
True
:mod:`sage` is designated to become an implicit namespace package::
sage: directory = os.path.dirname(sage.env.__file__); directory
sage: directory = sage.__path__[0]; directory
'.../sage'
sage: is_package_or_sage_namespace_package_dir(directory)
True
Expand Down

0 comments on commit dc8b3c5

Please sign in to comment.