summaryrefslogtreecommitdiff
path: root/Lib/test/test_importlib/resources/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_importlib/resources/util.py')
-rw-r--r--Lib/test/test_importlib/resources/util.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/Lib/test/test_importlib/resources/util.py b/Lib/test/test_importlib/resources/util.py
index 7192632230..11c8aa8080 100644
--- a/Lib/test/test_importlib/resources/util.py
+++ b/Lib/test/test_importlib/resources/util.py
@@ -1,10 +1,8 @@
import abc
-import contextlib
import importlib
import io
import sys
import types
-import warnings
from pathlib import Path, PurePath
from .. import data01
@@ -69,13 +67,6 @@ def create_package(file=None, path=None, is_package=True, contents=()):
)
-@contextlib.contextmanager
-def suppress_known_deprecation():
- with warnings.catch_warnings(record=True) as ctx:
- warnings.simplefilter('default', category=DeprecationWarning)
- yield ctx
-
-
class CommonTests(metaclass=abc.ABCMeta):
"""
Tests shared by test_open, test_path, and test_read.
@@ -106,18 +97,6 @@ class CommonTests(metaclass=abc.ABCMeta):
path = PurePath('utf-8.file')
self.execute(data01, path)
- def test_absolute_path(self):
- # An absolute path is a ValueError.
- path = Path(__file__)
- full_path = path.parent / 'utf-8.file'
- with self.assertRaises(ValueError):
- self.execute(data01, full_path)
-
- def test_relative_path(self):
- # A reative path is a ValueError.
- with self.assertRaises(ValueError):
- self.execute(data01, '../data01/utf-8.file')
-
def test_importing_module_as_side_effect(self):
# The anchor package can already be imported.
del sys.modules[data01.__name__]