Mercurial > hg-stable
changeset 36005:8140ce44dec4
parseindex: implement context manager method on the wrapper
This is needed for incoming cleanups.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Tue, 06 Feb 2018 12:25:11 +0100 |
parents | c839bbee1e13 |
children | 61326dd7cb8d |
files | tests/test-parseindex.t |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-parseindex.t Tue Feb 06 11:52:37 2018 +0100 +++ b/tests/test-parseindex.t Tue Feb 06 12:25:11 2018 +0100 @@ -41,6 +41,13 @@ > def __getattr__(self, key): > return getattr(self.real, key) > + > def __enter__(self): + > self.real.__enter__() + > return self + > + > def __exit__(self, *args, **kwargs): + > return self.real.__exit__(*args, **kwargs) + > > def opener(*args): > o = vfs.vfs(*args) > def wrapper(*a, **kwargs):