Optimize imports in test classes

This commit is contained in:
Eric Torres 2019-04-10 18:03:58 -07:00
parent 666449156c
commit 0b52b75dbf
4 changed files with 13 additions and 14 deletions

View File

@ -1,9 +1,12 @@
import json
import unittest
from io import StringIO
from pathlib import Path
from unittest.mock import PropertyMock, patch
from hypothesis import given
from hypothesis.strategies import booleans, characters, iterables, one_of, none, text
from pathlib import Path
from hypothesis.strategies import characters, one_of, lists, text
from rbackup.struct.hierarchy import Hierarchy
# ========== Constants ==========

View File

@ -2,24 +2,20 @@
.. author:: Eric Torres
:synopsis: Unit tests for the PackageManager module.
"""
import doctest
import subprocess
import unittest
from pathlib import Path
from unittest.mock import patch
from hypothesis import given
from hypothesis.strategies import (
booleans,
dictionaries,
from_regex,
integers,
iterables,
one_of,
none,
text,
)
from pathlib import Path
from rbackup.package_managers.packagemanager import PackageManager
from unittest.mock import patch
# ========== Constants ==========
TESTING_MODULE = "rbackup.package_managers.packagemanager"

View File

@ -1,12 +1,11 @@
# import doctest
import unittest
from unittest.mock import MagicMock, PropertyMock, patch
from hypothesis import given
from hypothesis.strategies import builds, lists, text
from pathlib import Path
from hypothesis.strategies import builds, characters, lists, text
from rbackup.struct.repository import Repository
from rbackup.struct.snapshot import Snapshot
from unittest.mock import MagicMock, PropertyMock, patch
# ========== Constants ==========
TESTING_PACKAGE = "rbackup.struct"

View File

@ -9,7 +9,8 @@ import unittest
from rbackup.struct.snapshot import Snapshot
# ========== Constants ==========
TESTING_MODULE = "rbackup.struct.snapshot"
TESTING_PACKAGE = "rbackup.struct"
TESTING_MODULE = f"{TESTING_PACKAGE}.snapshot"