From f98e3397ce75de6c11b2f082e86d9a1174f1ea6c Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Wed, 10 Apr 2019 19:23:17 -0700 Subject: [PATCH] Imports and docstring cleanups --- tests/test_hierarchy.py | 8 ++++++-- tests/test_repository.py | 12 ++++++++++-- tests/test_snapshot.py | 8 +------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/tests/test_hierarchy.py b/tests/test_hierarchy.py index 3c19100..331a3ae 100644 --- a/tests/test_hierarchy.py +++ b/tests/test_hierarchy.py @@ -1,11 +1,15 @@ -import json +""" +.. author:: Eric Torres + +Tests for the rbackup.struct.hierarchy module. +""" import unittest from io import StringIO from pathlib import Path from unittest.mock import PropertyMock, patch from hypothesis import given -from hypothesis.strategies import characters, one_of, lists, text +from hypothesis.strategies import characters, one_of, text from rbackup.struct.hierarchy import Hierarchy diff --git a/tests/test_repository.py b/tests/test_repository.py index 83123fa..bd3ec4b 100644 --- a/tests/test_repository.py +++ b/tests/test_repository.py @@ -1,8 +1,16 @@ +""" +.. author:: Eric Torres + +Tests for the rbackup.struct.repository module. +""" +# TODO test that the snapshot returned is actually in the repository +# TODO test creating snapshots, returned snapshot is an instance of Snapshot, etc. + import unittest -from unittest.mock import MagicMock, PropertyMock, patch +from unittest.mock import PropertyMock, patch from hypothesis import given -from hypothesis.strategies import builds, characters, lists, text +from hypothesis.strategies import characters, lists, text from rbackup.struct.repository import Repository from rbackup.struct.snapshot import Snapshot diff --git a/tests/test_snapshot.py b/tests/test_snapshot.py index 422db7d..cd00cf1 100644 --- a/tests/test_snapshot.py +++ b/tests/test_snapshot.py @@ -1,17 +1,11 @@ """ .. author:: Eric Torres -Unit tests for the Snapshot class. +Unit tests for the rbackup.struct.snapshot module. """ -import doctest -import unittest - -from rbackup.struct.snapshot import Snapshot # ========== Constants ========== TESTING_PACKAGE = "rbackup.struct" TESTING_MODULE = f"{TESTING_PACKAGE}.snapshot" - - # ========== Unit Tests ==========