From 666449156c2aeb9362fee53cc12ee4686339f463 Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Wed, 10 Apr 2019 18:00:47 -0700 Subject: [PATCH] Remove doctest run code --- rbackup/struct/hierarchy.py | 7 ------- tests/test_hierarchy.py | 9 ++------- tests/test_packagemanager.py | 6 ------ tests/test_snapshot.py | 5 ----- 4 files changed, 2 insertions(+), 25 deletions(-) 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 ==========