From 53b4fb69b34824c8bc5d515e8246ae3d26e87269 Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Fri, 12 Apr 2019 12:31:08 -0700 Subject: [PATCH] Doctest cleanup --- rbackup/config.py | 6 +++--- rbackup/struct/hierarchy.py | 12 ------------ rbackup/struct/snapshot.py | 3 --- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/rbackup/config.py b/rbackup/config.py index e23d435..ea560fe 100644 --- a/rbackup/config.py +++ b/rbackup/config.py @@ -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 - ... + :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 diff --git a/rbackup/struct/hierarchy.py b/rbackup/struct/hierarchy.py index e806b2a..b52369d 100644 --- a/rbackup/struct/hierarchy.py +++ b/rbackup/struct/hierarchy.py @@ -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" diff --git a/rbackup/struct/snapshot.py b/rbackup/struct/snapshot.py index fbd1a76..959e99f 100644 --- a/rbackup/struct/snapshot.py +++ b/rbackup/struct/snapshot.py @@ -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 """