Optimize imports in test classes
This commit is contained in:
parent
666449156c
commit
0b52b75dbf
@ -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 ==========
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user