diff --git a/pungi/phases/gather/methods/method_deps.py b/pungi/phases/gather/methods/method_deps.py index a7957601..b125fe1e 100644 --- a/pungi/phases/gather/methods/method_deps.py +++ b/pungi/phases/gather/methods/method_deps.py @@ -20,7 +20,7 @@ from kobo.shortcuts import run from kobo.pkgset import SimpleRpmWrapper, RpmWrapper from kobo.rpmlib import parse_nvra -from pungi.util import rmtree, get_arch_variant_data, temp_dir +from pungi.util import get_arch_variant_data, temp_dir from pungi.wrappers.pungi import PungiWrapper from pungi.arch import tree_arch_to_yum_arch, get_valid_arches diff --git a/tests/test_iso_wrapper.py b/tests/test_iso_wrapper.py index 7bf37a61..a870cfe2 100644 --- a/tests/test_iso_wrapper.py +++ b/tests/test_iso_wrapper.py @@ -1,10 +1,13 @@ # -*- coding: utf-8 -*- +import itertools import mock import os import sys -import unittest2 as unittest -import itertools +try: + import unittest2 as unittest +except ImportError: + import unittest sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) diff --git a/tests/test_pkgset_source_koji.py b/tests/test_pkgset_source_koji.py index 2126ee6b..564a8603 100644 --- a/tests/test_pkgset_source_koji.py +++ b/tests/test_pkgset_source_koji.py @@ -1,12 +1,15 @@ #!/usr/bin/env python2 # -*- coding: utf-8 -*- +import json import mock import os -import sys -import unittest2 as unittest -import json import re +import sys +try: + import unittest2 as unittest +except ImportError: + import unittest sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))