diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-08-13 17:20:44 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-08-13 17:20:44 +0200 |
commit | ba2566b581f3d7703a2d44f4507f82ce7ad6fa98 (patch) | |
tree | 140dc3d0df030e640fd9893c426c3746623c4a85 /tests | |
parent | 39bca9d1166b5fab6d4d889028bb9e32a2f65883 (diff) | |
download | gemato-ba2566b581f3d7703a2d44f4507f82ce7ad6fa98.tar.gz |
testutil: Remove obsolete test classes
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testutil.py | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/tests/testutil.py b/tests/testutil.py index 2becb23..2af60f7 100644 --- a/tests/testutil.py +++ b/tests/testutil.py @@ -1,19 +1,14 @@ # gemato: Test utility functions -# (c) 2017-2022 Michał Górny +# (c) 2017-2023 Michał Górny # Licensed under the terms of 2-clause BSD license import errno import functools -import io -import logging import os import os.path import random -import shutil import stat -import tempfile import threading -import unittest import pytest @@ -32,35 +27,6 @@ def disallow_writes(path): os.chmod(path, 0o555) -class LoggingTestCase(unittest.TestCase): - def setUp(self): - self.log = io.StringIO() - self.log_handler = logging.getLogger().addHandler( - logging.StreamHandler(self.log)) - - def tearDown(self): - # TODO: make some use of the log output? - logging.getLogger().removeHandler(self.log_handler) - - -class TempDirTestCase(LoggingTestCase): - DIRS = [] - FILES = {} - - def setUp(self): - super().setUp() - self.dir = tempfile.mkdtemp() - for k in self.DIRS: - os.mkdir(os.path.join(self.dir, k)) - for k, v in self.FILES.items(): - with open(os.path.join(self.dir, k), 'w', encoding='utf8') as f: - f.write(v) - - def tearDown(self): - shutil.rmtree(self.dir) - super().tearDown() - - class HKPServerRequestHandler(BaseHTTPRequestHandler): def __init__(self, keys, *args, **kwargs): self.keys = keys |