Imports and docstring cleanups

This commit is contained in:
Eric Torres 2019-04-10 19:23:17 -07:00
parent 0845d6f00d
commit f98e3397ce
3 changed files with 17 additions and 11 deletions

View File

@ -1,11 +1,15 @@
import json """
.. author:: Eric Torres
Tests for the rbackup.struct.hierarchy module.
"""
import unittest import unittest
from io import StringIO from io import StringIO
from pathlib import Path from pathlib import Path
from unittest.mock import PropertyMock, patch from unittest.mock import PropertyMock, patch
from hypothesis import given 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 from rbackup.struct.hierarchy import Hierarchy

View File

@ -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 import unittest
from unittest.mock import MagicMock, PropertyMock, patch from unittest.mock import PropertyMock, patch
from hypothesis import given 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.repository import Repository
from rbackup.struct.snapshot import Snapshot from rbackup.struct.snapshot import Snapshot

View File

@ -1,17 +1,11 @@
""" """
.. author:: Eric Torres .. 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 ========== # ========== Constants ==========
TESTING_PACKAGE = "rbackup.struct" TESTING_PACKAGE = "rbackup.struct"
TESTING_MODULE = f"{TESTING_PACKAGE}.snapshot" TESTING_MODULE = f"{TESTING_PACKAGE}.snapshot"
# ========== Unit Tests ========== # ========== Unit Tests ==========