Optimize imports in test classes
This commit is contained in:
parent
666449156c
commit
0b52b75dbf
@ -1,9 +1,12 @@
|
|||||||
import json
|
import json
|
||||||
import unittest
|
import unittest
|
||||||
|
from io import StringIO
|
||||||
|
from pathlib import Path
|
||||||
|
from unittest.mock import PropertyMock, patch
|
||||||
|
|
||||||
from hypothesis import given
|
from hypothesis import given
|
||||||
from hypothesis.strategies import booleans, characters, iterables, one_of, none, text
|
from hypothesis.strategies import characters, one_of, lists, text
|
||||||
from pathlib import Path
|
|
||||||
from rbackup.struct.hierarchy import Hierarchy
|
from rbackup.struct.hierarchy import Hierarchy
|
||||||
|
|
||||||
# ========== Constants ==========
|
# ========== Constants ==========
|
||||||
|
@ -2,24 +2,20 @@
|
|||||||
.. author:: Eric Torres
|
.. author:: Eric Torres
|
||||||
:synopsis: Unit tests for the PackageManager module.
|
:synopsis: Unit tests for the PackageManager module.
|
||||||
"""
|
"""
|
||||||
import doctest
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import unittest
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
|
from unittest.mock import patch
|
||||||
|
|
||||||
from hypothesis import given
|
from hypothesis import given
|
||||||
from hypothesis.strategies import (
|
from hypothesis.strategies import (
|
||||||
booleans,
|
|
||||||
dictionaries,
|
|
||||||
from_regex,
|
from_regex,
|
||||||
integers,
|
|
||||||
iterables,
|
iterables,
|
||||||
one_of,
|
one_of,
|
||||||
none,
|
|
||||||
text,
|
text,
|
||||||
)
|
)
|
||||||
from pathlib import Path
|
|
||||||
from rbackup.package_managers.packagemanager import PackageManager
|
from rbackup.package_managers.packagemanager import PackageManager
|
||||||
from unittest.mock import patch
|
|
||||||
|
|
||||||
# ========== Constants ==========
|
# ========== Constants ==========
|
||||||
TESTING_MODULE = "rbackup.package_managers.packagemanager"
|
TESTING_MODULE = "rbackup.package_managers.packagemanager"
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
# import doctest
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest.mock import MagicMock, PropertyMock, patch
|
||||||
|
|
||||||
from hypothesis import given
|
from hypothesis import given
|
||||||
from hypothesis.strategies import builds, lists, text
|
from hypothesis.strategies import builds, characters, lists, text
|
||||||
from pathlib import Path
|
|
||||||
from rbackup.struct.repository import Repository
|
from rbackup.struct.repository import Repository
|
||||||
from rbackup.struct.snapshot import Snapshot
|
from rbackup.struct.snapshot import Snapshot
|
||||||
from unittest.mock import MagicMock, PropertyMock, patch
|
|
||||||
|
|
||||||
# ========== Constants ==========
|
# ========== Constants ==========
|
||||||
TESTING_PACKAGE = "rbackup.struct"
|
TESTING_PACKAGE = "rbackup.struct"
|
||||||
|
@ -9,7 +9,8 @@ import unittest
|
|||||||
from rbackup.struct.snapshot import Snapshot
|
from rbackup.struct.snapshot import Snapshot
|
||||||
|
|
||||||
# ========== Constants ==========
|
# ========== 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