tests: drop sys.path modification

It's unnecessary to add the path manually.

Signed-off-by: Haibo Lin <hlin@redhat.com>
This commit is contained in:
Haibo Lin 2019-12-06 16:31:57 +08:00
parent 3cf16eb42d
commit 0ed70fc8b6
52 changed files with 0 additions and 108 deletions

View File

@ -6,8 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.arch import (get_compatible_arches, get_valid_arches, get_valid_multilib_arches, from pungi.arch import (get_compatible_arches, get_valid_arches, get_valid_multilib_arches,
is_excluded, is_valid_arch, split_name_arch) is_excluded, is_valid_arch, split_name_arch)

View File

@ -7,8 +7,6 @@ import six
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.phases.buildinstall import (BuildinstallPhase, BuildinstallThread, link_boot_iso, from pungi.phases.buildinstall import (BuildinstallPhase, BuildinstallThread, link_boot_iso,
BOOT_CONFIGS, tweak_configs) BOOT_CONFIGS, tweak_configs)
from tests.helpers import DummyCompose, PungiTestCase, touch from tests.helpers import DummyCompose, PungiTestCase, touch

View File

@ -11,8 +11,6 @@ from six import StringIO
import kobo.conf import kobo.conf
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from pungi import checks from pungi import checks

View File

@ -12,8 +12,6 @@ import sys
import tempfile import tempfile
import shutil import shutil
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.compose import Compose from pungi.compose import Compose

View File

@ -9,8 +9,6 @@ import tempfile
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.wrappers.comps import CompsWrapper, CompsFilter, CompsValidationError from pungi.wrappers.comps import CompsWrapper, CompsFilter, CompsValidationError
from tests.helpers import BaseTestCase, FIXTURE_DIR from tests.helpers import BaseTestCase, FIXTURE_DIR

View File

@ -11,8 +11,6 @@ import six
import sys import sys
import mock import mock
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from pungi import checks from pungi import checks
from tests.helpers import load_config, PKGSET_REPOS from tests.helpers import load_config, PKGSET_REPOS

View File

@ -10,8 +10,6 @@ import sys
from parameterized import parameterized from parameterized import parameterized
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi_utils import config_utils from pungi_utils import config_utils

View File

@ -7,8 +7,6 @@ import six
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from tests import helpers from tests import helpers
from pungi.createiso import CreateIsoOpts from pungi.createiso import CreateIsoOpts
from pungi.phases import createiso from pungi.phases import createiso

View File

@ -6,8 +6,6 @@ import os
import sys import sys
from six.moves import StringIO from six.moves import StringIO
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from tests import helpers from tests import helpers
from pungi import createiso from pungi import createiso

View File

@ -10,8 +10,6 @@ import six
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.wrappers.createrepo import CreaterepoWrapper from pungi.wrappers.createrepo import CreaterepoWrapper

View File

@ -12,8 +12,6 @@ import os
import six import six
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.phases.createrepo import (CreaterepoPhase, from pungi.phases.createrepo import (CreaterepoPhase,
create_variant_repo, create_variant_repo,
get_productids_from_scm, get_productids_from_scm,

View File

@ -8,8 +8,6 @@ from productmd.extra_files import ExtraFiles
import six import six
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.phases import extra_files from pungi.phases import extra_files
from tests import helpers from tests import helpers

View File

@ -7,8 +7,6 @@ import six
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from tests import helpers from tests import helpers
from pungi.phases import extra_isos from pungi.phases import extra_isos

View File

@ -12,8 +12,6 @@ import six
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.wrappers import fus from pungi.wrappers import fus
from .helpers import touch, PungiTestCase from .helpers import touch, PungiTestCase

View File

@ -15,11 +15,6 @@ import logging
from six.moves import cStringIO from six.moves import cStringIO
HERE = os.path.dirname(__file__)
BINDIR = (os.path.join(HERE, '..', 'bin'))
sys.path.insert(0, os.path.join(HERE, '..'))
os.environ['PATH'] = '%s:%s' % (BINDIR, os.environ['PATH'])
from pungi.wrappers.pungi import PungiWrapper from pungi.wrappers.pungi import PungiWrapper
try: try:
from pungi.dnf_wrapper import DnfWrapper, Conf from pungi.dnf_wrapper import DnfWrapper, Conf

View File

@ -4,8 +4,6 @@ import mock
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.phases.gather.methods import method_deps as deps from pungi.phases.gather.methods import method_deps as deps
from tests import helpers from tests import helpers

View File

@ -8,8 +8,6 @@ import sys
import six import six
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.phases.gather.methods import method_hybrid as hybrid from pungi.phases.gather.methods import method_hybrid as hybrid
from pungi.phases.pkgset.common import MaterializedPackageSet as PkgSet from pungi.phases.pkgset.common import MaterializedPackageSet as PkgSet
from tests import helpers from tests import helpers

View File

@ -6,8 +6,6 @@ import sys
import six import six
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.phases.gather.methods import method_nodeps as nodeps from pungi.phases.gather.methods import method_nodeps as nodeps
from tests import helpers from tests import helpers

View File

@ -12,8 +12,6 @@ except ImportError:
import six import six
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.phases import gather from pungi.phases import gather
from pungi.phases.pkgset.common import MaterializedPackageSet from pungi.phases.pkgset.common import MaterializedPackageSet
from pungi.phases.gather import _mk_pkg_map from pungi.phases.gather import _mk_pkg_map

View File

@ -10,8 +10,6 @@ import six
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.phases.gather.sources.source_module import GatherSourceModule from pungi.phases.gather.sources.source_module import GatherSourceModule
from tests import helpers from tests import helpers
from pungi.module_util import Modulemd from pungi.module_util import Modulemd

View File

@ -10,8 +10,6 @@ import sys
from pungi.graph import SimpleAcyclicOrientedGraph from pungi.graph import SimpleAcyclicOrientedGraph
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
class SimpleAcyclicOrientedGraphTestCase(unittest.TestCase): class SimpleAcyclicOrientedGraphTestCase(unittest.TestCase):

View File

@ -7,8 +7,6 @@ import six
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.phases.image_build import ImageBuildPhase, CreateImageBuildThread from pungi.phases.image_build import ImageBuildPhase, CreateImageBuildThread
from tests.helpers import DummyCompose, PungiTestCase, boom from tests.helpers import DummyCompose, PungiTestCase, boom

View File

@ -11,8 +11,6 @@ import sys
import tempfile import tempfile
import shutil import shutil
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.phases.image_checksum import ImageChecksumPhase, dump_checksums from pungi.phases.image_checksum import ImageChecksumPhase, dump_checksums
from tests.helpers import DummyCompose, PungiTestCase from tests.helpers import DummyCompose, PungiTestCase

View File

@ -12,8 +12,6 @@ import six
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.module_util import Modulemd from pungi.module_util import Modulemd
from pungi.phases import init from pungi.phases import init
from tests.helpers import DummyCompose, PungiTestCase, touch, mk_boom, fake_run_in_threads from tests.helpers import DummyCompose, PungiTestCase, touch, mk_boom, fake_run_in_threads

View File

@ -9,8 +9,6 @@ try:
except ImportError: except ImportError:
import unittest import unittest
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.wrappers import iso from pungi.wrappers import iso
CORRECT_OUTPUT = '''dummy.iso: 31ff3e405e26ad01c63b62f6b11d30f6 CORRECT_OUTPUT = '''dummy.iso: 31ff3e405e26ad01c63b62f6b11d30f6

View File

@ -13,8 +13,6 @@ import sys
import six import six
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.wrappers.kojiwrapper import KojiWrapper, get_buildroot_rpms from pungi.wrappers.kojiwrapper import KojiWrapper, get_buildroot_rpms
from .helpers import FIXTURE_DIR from .helpers import FIXTURE_DIR

View File

@ -7,8 +7,6 @@ import os
import stat import stat
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi import linker from pungi import linker
from tests import helpers from tests import helpers

View File

@ -8,8 +8,6 @@ import sys
import six import six
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.phases.live_images import LiveImagesPhase, CreateLiveImageThread from pungi.phases.live_images import LiveImagesPhase, CreateLiveImageThread
from tests.helpers import DummyCompose, PungiTestCase, boom from tests.helpers import DummyCompose, PungiTestCase, boom

View File

@ -7,8 +7,6 @@ import os
import six import six
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.phases.livemedia_phase import LiveMediaPhase, LiveMediaThread from pungi.phases.livemedia_phase import LiveMediaPhase, LiveMediaThread
from tests.helpers import DummyCompose, PungiTestCase, boom from tests.helpers import DummyCompose, PungiTestCase, boom

View File

@ -10,8 +10,6 @@ import sys
import six import six
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.wrappers.lorax import LoraxWrapper from pungi.wrappers.lorax import LoraxWrapper

View File

@ -8,8 +8,6 @@ import os
import sys import sys
import mock import mock
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from pungi import media_split from pungi import media_split

View File

@ -4,8 +4,6 @@ import sys
import six import six
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from tests import helpers from tests import helpers
from pungi import metadata from pungi import metadata

View File

@ -10,8 +10,6 @@ try:
except ImportError: except ImportError:
import unittest import unittest
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.notifier import PungiNotifier from pungi.notifier import PungiNotifier

View File

@ -16,8 +16,6 @@ from six.moves import configparser
from parameterized import parameterized from parameterized import parameterized
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from tests.helpers import BaseTestCase, PungiTestCase, touch, FIXTURE_DIR from tests.helpers import BaseTestCase, PungiTestCase, touch, FIXTURE_DIR
from pungi_utils import orchestrator as o from pungi_utils import orchestrator as o

View File

@ -7,8 +7,6 @@ import copy
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from tests import helpers from tests import helpers
from pungi import checks from pungi import checks
from pungi.phases import osbs from pungi.phases import osbs

View File

@ -7,8 +7,6 @@ import sys
from kobo.shortcuts import force_list from kobo.shortcuts import force_list
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from tests import helpers from tests import helpers
from pungi.phases import ostree_installer as ostree from pungi.phases import ostree_installer as ostree
from six.moves import shlex_quote from six.moves import shlex_quote

View File

@ -7,8 +7,6 @@ import mock
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from tests import helpers from tests import helpers
from pungi.phases import ostree from pungi.phases import ostree

View File

@ -9,9 +9,6 @@ import mock
import six import six
import yaml import yaml
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'bin'))
from tests import helpers from tests import helpers
from pungi import ostree from pungi import ostree

View File

@ -5,8 +5,6 @@ import mock
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from tests import helpers from tests import helpers
from pungi.ostree import utils from pungi.ostree import utils

View File

@ -8,8 +8,6 @@ try:
except ImportError: except ImportError:
import unittest import unittest
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from tests.helpers import boom, touch, copy_fixture from tests.helpers import boom, touch, copy_fixture
from pungi_utils import patch_iso from pungi_utils import patch_iso

View File

@ -5,8 +5,6 @@ import unittest
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.pathmatch import PathMatch, head_tail_split from pungi.pathmatch import PathMatch, head_tail_split

View File

@ -10,8 +10,6 @@ import random
import sys import sys
import time import time
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.phases import weaver from pungi.phases import weaver
from tests.helpers import DummyCompose, boom from tests.helpers import DummyCompose, boom

View File

@ -6,8 +6,6 @@ import sys
import mock import mock
import six import six
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.module_util import Modulemd from pungi.module_util import Modulemd
from pungi.phases.pkgset import common from pungi.phases.pkgset import common
from tests import helpers from tests import helpers

View File

@ -13,8 +13,6 @@ import tempfile
import re import re
from dogpile.cache import make_region from dogpile.cache import make_region
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.phases.pkgset import pkgsets from pungi.phases.pkgset import pkgsets
from tests import helpers from tests import helpers

View File

@ -11,8 +11,6 @@ try:
except ImportError: except ImportError:
import unittest import unittest
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.phases.pkgset.sources import source_koji from pungi.phases.pkgset.sources import source_koji
from tests import helpers from tests import helpers
from pungi.module_util import Modulemd from pungi.module_util import Modulemd

View File

@ -4,8 +4,6 @@ import os
import sys import sys
import six import six
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.wrappers import repoclosure as rc from pungi.wrappers import repoclosure as rc
from . import helpers from . import helpers

View File

@ -4,8 +4,6 @@ import mock
import os import os
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.runroot import Runroot from pungi.runroot import Runroot
from tests import helpers from tests import helpers

View File

@ -12,8 +12,6 @@ import os
import sys import sys
import six import six
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.wrappers import scm from pungi.wrappers import scm
from tests.helpers import touch from tests.helpers import touch

View File

@ -11,8 +11,6 @@ import os
import six import six
import sys import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import pungi.phases.test as test_phase import pungi.phases.test as test_phase
from tests.helpers import DummyCompose, PungiTestCase, touch, mk_boom from tests.helpers import DummyCompose, PungiTestCase, touch, mk_boom

View File

@ -7,8 +7,6 @@ import sys
import six import six
from six.moves.configparser import SafeConfigParser from six.moves.configparser import SafeConfigParser
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from tests.helpers import PungiTestCase, FIXTURE_DIR, touch, mk_boom from tests.helpers import PungiTestCase, FIXTURE_DIR, touch, mk_boom
from pungi_utils import unified_isos from pungi_utils import unified_isos

View File

@ -13,8 +13,6 @@ import shutil
import subprocess import subprocess
import six import six
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi import compose from pungi import compose
from pungi import util from pungi import util

View File

@ -8,8 +8,6 @@ import os
import sys import sys
from six.moves import cStringIO from six.moves import cStringIO
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.wrappers.variants import VariantsXmlParser from pungi.wrappers.variants import VariantsXmlParser
VARIANTS_WITH_WHITESPACE = """ VARIANTS_WITH_WHITESPACE = """