Skip to content
Snippets Groups Projects
Commit aab258e4 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

v2.25.1 - added arguments to EmptyContextManager

parent 1d8f0079
No related branches found
No related tags found
No related merge requests found
# v2.25.0 # v2.25.1
* added safe_listdir * added parameters for EmptyContextManager
* fixed a bug occurring in Python 3.10 with whereis
* DirectorySource will raise an exception if directory does not exist and on_fail is set to RAISE
Build system
============
* Python 3.6 support dropped as it does not employ pyproject.toml, which is necessary
to build this
* fixed unit tests to run on Py3.12
* removed Docker unit tests
* a unit test had some problems running under PyPy
__version__ = '2.25.0' __version__ = '2.25.1'
...@@ -9,8 +9,13 @@ class EmptyContextManager: ...@@ -9,8 +9,13 @@ class EmptyContextManager:
>>> ctxt = EmptyContextManager() >>> ctxt = EmptyContextManager()
>>> with ctxt: >>> with ctxt:
>>> ... >>> ...
Note that it will accept any parameters, and then throw them on the ground.
""" """
def __init__(self, *args, **kwargs):
pass
def __enter__(self): def __enter__(self):
return self return self
......
...@@ -9,7 +9,7 @@ from satella.exceptions import PreconditionError ...@@ -9,7 +9,7 @@ from satella.exceptions import PreconditionError
class TestTypecheck(unittest.TestCase): class TestTypecheck(unittest.TestCase):
def test_empty_ctxt_manager(self): def test_empty_ctxt_manager(self):
with EmptyContextManager() as p: with EmptyContextManager(1, 2) as p:
pass pass
def test_except_exception(self): def test_except_exception(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment