Doctest cleanup
This commit is contained in:
parent
47cf3fc7d8
commit
53b4fb69b3
@ -29,7 +29,7 @@ def get_files_by_suffix(suffix):
|
||||
"""Retrieve all include files from the program configuration directory.
|
||||
|
||||
>>> get_files_by_suffix('-include.conf') # doctest: +ELLIPSIS
|
||||
...
|
||||
<generator object ...>
|
||||
|
||||
:param suffix: the suffix to search for
|
||||
:type suffix: str
|
||||
@ -45,8 +45,8 @@ def merge_files(files):
|
||||
|
||||
Any files included that do not exist send a warning to the log.
|
||||
|
||||
>>> merge_files() # doctest: +ELLIPSIS
|
||||
PosixPath(/tmp/...)
|
||||
>>> merge_files(get_files_by_suffix('')) # doctest: +ELLIPSIS
|
||||
PosixPath('/tmp/...')
|
||||
|
||||
:param files: files including paths to read from
|
||||
:type files: iterable of path-like objects
|
||||
|
@ -44,9 +44,6 @@ class Hierarchy(PathLike):
|
||||
def __init__(self, dest):
|
||||
"""Default constructor for the Hierarchy class.
|
||||
|
||||
>>> Hierarchy('backup_dir').path
|
||||
PosixPath('backup_dir')
|
||||
|
||||
:param dest: the root directory of the backup hierarchy
|
||||
:type dest: str or path-like object
|
||||
"""
|
||||
@ -66,9 +63,6 @@ class Hierarchy(PathLike):
|
||||
def path(self):
|
||||
"""Return the base directory of this hierarchy.
|
||||
|
||||
>>> Hierarchy('backup').path
|
||||
PosixPath('backup')
|
||||
|
||||
:rtype: path-like object
|
||||
"""
|
||||
return self._path
|
||||
@ -77,9 +71,6 @@ class Hierarchy(PathLike):
|
||||
def name(self):
|
||||
"""Return the name of this hierarchy.
|
||||
|
||||
>>> Hierarchy('backup/data/snapshot-one').name
|
||||
'snapshot-one'
|
||||
|
||||
:rtype: str
|
||||
"""
|
||||
return self._path.name
|
||||
@ -88,9 +79,6 @@ class Hierarchy(PathLike):
|
||||
def metadata_path(self):
|
||||
"""Return the path of this hierarchy's metadata file.
|
||||
|
||||
>>> Hierarchy('backup').metadata_path
|
||||
PosixPath('backup/.metadata')
|
||||
|
||||
:rtype: path-like object
|
||||
"""
|
||||
return self._path / ".metadata"
|
||||
|
@ -39,9 +39,6 @@ class Snapshot(Hierarchy):
|
||||
@property
|
||||
def pkg_dir(self):
|
||||
"""Retrieve the package manager backup directory of this snapshot.
|
||||
>>> s = Snapshot('backup/data/snapshot-new')
|
||||
>>> s.pkg_dir
|
||||
PosixPath('backup/data/snapshot-new/pkg')
|
||||
|
||||
:rtype: path-like object
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user