diff --git a/rbackup/struct/hierarchy.py b/rbackup/struct/hierarchy.py index 88069af..2db8d30 100644 --- a/rbackup/struct/hierarchy.py +++ b/rbackup/struct/hierarchy.py @@ -128,10 +128,3 @@ class Hierarchy(PathLike): json.dump(attr, mfile) tmpfile.rename(self.metadata_path) - - -# ========== Functions ========== -if __name__ == "__main__": - import doctest - - doctest.testmod() diff --git a/tests/test_hierarchy.py b/tests/test_hierarchy.py index 283845b..03bf859 100644 --- a/tests/test_hierarchy.py +++ b/tests/test_hierarchy.py @@ -7,13 +7,8 @@ from pathlib import Path from rbackup.struct.hierarchy import Hierarchy # ========== Constants ========== -TESTING_MODULE = "rbackup.struct.struct" - - -# ========== Functions ========== -def load_tests(loader, tests, ignore): - tests.addTests(doctest.DocTestSuite(TESTING_MODULE)) - return tests +TESTING_PACKAGE = "rbackup.struct" +TESTING_MODULE = f"{TESTING_PACKAGE}.hierarchy" # ========== Tests ========== diff --git a/tests/test_packagemanager.py b/tests/test_packagemanager.py index edeca35..30a64a8 100644 --- a/tests/test_packagemanager.py +++ b/tests/test_packagemanager.py @@ -25,12 +25,6 @@ from unittest.mock import patch TESTING_MODULE = "rbackup.package_managers.packagemanager" -# ========== Functions ========== -def load_tests(loader, tests, ignore): - tests.addTests(doctest.DocTestSuite(TESTING_MODULE)) - return tests - - # ========== Test Cases ========== class TestCreatePackageManager(unittest.TestCase): def setUp(self): diff --git a/tests/test_snapshot.py b/tests/test_snapshot.py index eb493f5..edf0670 100644 --- a/tests/test_snapshot.py +++ b/tests/test_snapshot.py @@ -12,10 +12,5 @@ from rbackup.struct.snapshot import Snapshot TESTING_MODULE = "rbackup.struct.snapshot" -# ========== Functions ========== -def load_tests(loader, tests, ignore): - tests.addTests(doctest.DocTestSuite(TESTING_MODULE)) - return tests - # ========== Unit Tests ==========