curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #00040
Re: [Merge] ~raharper/curtin:fix/unittest-prevent-subp-by-default into curtin:master
Sorry, noticed one more thing! Other than that, this looks good now, thanks for the refactors!
Diff comments:
> diff --git a/tests/unittests/helpers.py b/tests/unittests/helpers.py
> index 9514745..b48bdfb 100644
> --- a/tests/unittests/helpers.py
> +++ b/tests/unittests/helpers.py
> @@ -11,8 +10,15 @@ import string
> import tempfile
> from unittest import TestCase, skipIf
>
> +try:
I don't think this is needed, contextmanager has been in contextlib since it was introduced in Python 2.5. (We do need it for other Python 3-only contextlib things, but not this one.)
EDIT: Oh, and we don't actually depend on contextlib2 AFAICT, so we should definitely drop this before landing.
> + from contextlib import contextmanager
> +except ImportError:
> + from contextlib2 import contextmanager
> +
> from curtin import util
>
> +_real_subp = util.subp
> +
>
> def builtin_module_name():
> options = ('builtins', '__builtin__')
--
https://code.launchpad.net/~raharper/curtin/+git/curtin/+merge/382604
Your team curtin developers is subscribed to branch curtin:master.
References