[Patchew-devel] [PATCH v2] tests: fix test_tags for Python < 3.6
Caio Carrara
ccarrara at redhat.com
Tue Nov 27 19:35:45 UTC 2018
Hi Paolo,
On Tue, Nov 27, 2018 at 07:48:29PM +0100, Paolo Bonzini wrote:
> Older versions of Python require importing subpackages explicitly;
> you cannot just import the parent and look for subpackages using
> dot notation. Fix this.
Cool! I didn't know that.
>
> Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
Reviewed-by: Caio Carrara <ccarrara at redhat.com>
> ---
> tests/test_tags.py | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tests/test_tags.py b/tests/test_tags.py
> index a49a660..075c497 100755
> --- a/tests/test_tags.py
> +++ b/tests/test_tags.py
> @@ -13,6 +13,8 @@ import os
> sys.path.append(os.path.dirname(__file__))
> from tests.patchewtest import PatchewTestCase, main
> import email
> +import email.parser
> +import email.policy
> from mbox import decode_payload
>
> class ImportTest(PatchewTestCase):
> --
> 2.19.1
>
Thanks,
--
Caio Carrara
Software Engineer, Virt Team - Red Hat
ccarrara at redhat.com
More information about the Patchew-devel
mailing list