tests import path: put shipped pmb code first
Always test the pmb code from the parent folder of the tests, even if a stable version of pmbootstrap is installed with pip or pysetup.
This commit is contained in:
parent
56d813421f
commit
424ad3f078
|
@ -24,7 +24,7 @@ import pytest
|
|||
|
||||
# Import from parent directory
|
||||
pmb_src = os.path.realpath(os.path.join(os.path.dirname(__file__) + "/.."))
|
||||
sys.path.append(pmb_src)
|
||||
sys.path.insert(0, pmb_src)
|
||||
import pmb.chroot.apk_static
|
||||
import pmb.config
|
||||
import pmb.parse.apkindex
|
||||
|
|
|
@ -24,7 +24,7 @@ import filecmp
|
|||
|
||||
# Import from parent directory
|
||||
pmb_src = os.path.realpath(os.path.join(os.path.dirname(__file__) + "/.."))
|
||||
sys.path.append(pmb_src)
|
||||
sys.path.insert(0, pmb_src)
|
||||
|
||||
import pmb.aportgen
|
||||
import pmb.aportgen.core
|
||||
|
|
|
@ -22,7 +22,7 @@ import pytest
|
|||
import sys
|
||||
|
||||
# Import from parent directory
|
||||
sys.path.append(os.path.realpath(
|
||||
sys.path.insert(0, os.path.realpath(
|
||||
os.path.join(os.path.dirname(__file__) + "/..")))
|
||||
import pmb.aportgen
|
||||
import pmb.config
|
||||
|
|
|
@ -22,7 +22,7 @@ import pytest
|
|||
|
||||
# Import from parent directory
|
||||
pmb_src = os.path.realpath(os.path.join(os.path.dirname(__file__) + "/.."))
|
||||
sys.path.append(pmb_src)
|
||||
sys.path.insert(0, pmb_src)
|
||||
import pmb.chroot.apk_static
|
||||
import pmb.parse.apkindex
|
||||
import pmb.helpers.logging
|
||||
|
|
|
@ -21,7 +21,7 @@ import sys
|
|||
import pytest
|
||||
|
||||
# Import from parent directory
|
||||
sys.path.append(os.path.realpath(
|
||||
sys.path.insert(0, os.path.realpath(
|
||||
os.path.join(os.path.dirname(__file__) + "/..")))
|
||||
import pmb.build.other
|
||||
import pmb.helpers.logging
|
||||
|
|
|
@ -29,7 +29,7 @@ import shutil
|
|||
import sys
|
||||
|
||||
# Import from parent directory
|
||||
sys.path.append(os.path.realpath(
|
||||
sys.path.insert(0, os.path.realpath(
|
||||
os.path.join(os.path.dirname(__file__) + "/..")))
|
||||
import pmb.build
|
||||
import pmb.build._package
|
||||
|
|
|
@ -27,7 +27,7 @@ import pytest
|
|||
import sys
|
||||
|
||||
# Import from parent directory
|
||||
sys.path.append(os.path.realpath(
|
||||
sys.path.insert(0, os.path.realpath(
|
||||
os.path.join(os.path.dirname(__file__) + "/..")))
|
||||
import pmb.build
|
||||
import pmb.helpers.logging
|
||||
|
|
|
@ -21,7 +21,7 @@ import sys
|
|||
import pytest
|
||||
|
||||
# Import from parent directory
|
||||
sys.path.append(os.path.realpath(
|
||||
sys.path.insert(0, os.path.realpath(
|
||||
os.path.join(os.path.dirname(__file__) + "/..")))
|
||||
import pmb.aportgen
|
||||
import pmb.config
|
||||
|
|
|
@ -22,7 +22,7 @@ import pytest
|
|||
import sys
|
||||
|
||||
# Import from parent directory
|
||||
sys.path.append(os.path.realpath(
|
||||
sys.path.insert(0, os.path.realpath(
|
||||
os.path.join(os.path.dirname(__file__) + "/..")))
|
||||
import pmb.build
|
||||
import pmb.chroot.distccd
|
||||
|
|
|
@ -22,7 +22,7 @@ import time
|
|||
import pytest
|
||||
|
||||
# Import from parent directory
|
||||
sys.path.append(os.path.realpath(
|
||||
sys.path.insert(0, os.path.realpath(
|
||||
os.path.join(os.path.dirname(__file__) + "/..")))
|
||||
import pmb.helpers.git
|
||||
import pmb.helpers.logging
|
||||
|
|
|
@ -21,7 +21,7 @@ import sys
|
|||
import pytest
|
||||
|
||||
# Import from parent directory
|
||||
sys.path.append(os.path.abspath(
|
||||
sys.path.insert(0, os.path.abspath(
|
||||
os.path.join(os.path.dirname(__file__) + "/..")))
|
||||
import pmb.helpers.logging
|
||||
import pmb.helpers.other
|
||||
|
|
|
@ -21,7 +21,7 @@ import sys
|
|||
import pytest
|
||||
|
||||
# Import from parent directory
|
||||
sys.path.append(os.path.realpath(
|
||||
sys.path.insert(0, os.path.realpath(
|
||||
os.path.join(os.path.dirname(__file__) + "/..")))
|
||||
import pmb.config
|
||||
import pmb.parse
|
||||
|
|
|
@ -22,7 +22,7 @@ import sys
|
|||
|
||||
# Import from parent directory
|
||||
pmb_src = os.path.realpath(os.path.join(os.path.dirname(__file__) + "/.."))
|
||||
sys.path.append(pmb_src)
|
||||
sys.path.insert(0, pmb_src)
|
||||
import pmb.aportgen.device
|
||||
import pmb.config
|
||||
import pmb.config.init
|
||||
|
|
|
@ -23,7 +23,7 @@ import glob
|
|||
import filecmp
|
||||
|
||||
# Import from parent directory
|
||||
sys.path.append(os.path.realpath(
|
||||
sys.path.insert(0, os.path.realpath(
|
||||
os.path.join(os.path.dirname(__file__) + "/..")))
|
||||
import pmb.parse.apkindex
|
||||
import pmb.helpers.logging
|
||||
|
|
|
@ -20,7 +20,7 @@ import os
|
|||
import sys
|
||||
|
||||
# Import from parent directory
|
||||
sys.path.append(os.path.realpath(
|
||||
sys.path.insert(0, os.path.realpath(
|
||||
os.path.join(os.path.dirname(__file__) + "/..")))
|
||||
import pmb.helpers.mount
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import pytest
|
|||
import sys
|
||||
|
||||
# Import from parent directory
|
||||
sys.path.append(os.path.realpath(
|
||||
sys.path.insert(0, os.path.realpath(
|
||||
os.path.join(os.path.dirname(__file__) + "/..")))
|
||||
import pmb.build.newapkbuild
|
||||
import pmb.config
|
||||
|
|
|
@ -23,7 +23,7 @@ import sys
|
|||
|
||||
# Import from parent directory
|
||||
pmb_src = os.path.realpath(os.path.join(os.path.dirname(__file__) + "/.."))
|
||||
sys.path.append(pmb_src)
|
||||
sys.path.insert(0, pmb_src)
|
||||
import pmb.parse._apkbuild
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import pytest
|
|||
import sys
|
||||
|
||||
# Import from parent directory
|
||||
sys.path.append(os.path.realpath(
|
||||
sys.path.insert(0, os.path.realpath(
|
||||
os.path.join(os.path.dirname(__file__) + "/..")))
|
||||
import pmb.parse.apkindex
|
||||
import pmb.helpers.logging
|
||||
|
|
|
@ -27,7 +27,7 @@ import pytest
|
|||
import sys
|
||||
|
||||
# Import from parent directory
|
||||
sys.path.append(os.path.realpath(
|
||||
sys.path.insert(0, os.path.realpath(
|
||||
os.path.join(os.path.dirname(__file__) + "/..")))
|
||||
import pmb.config
|
||||
import pmb.config.init
|
||||
|
|
|
@ -28,7 +28,7 @@ import sys
|
|||
|
||||
# Import from parent directory
|
||||
pmb_src = os.path.realpath(os.path.join(os.path.dirname(__file__) + "/.."))
|
||||
sys.path.append(pmb_src)
|
||||
sys.path.insert(0, pmb_src)
|
||||
import pmb.helpers.pkgrel_bump
|
||||
import pmb.helpers.logging
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import time
|
|||
|
||||
# Import from parent directory
|
||||
pmb_src = os.path.realpath(os.path.join(os.path.dirname(__file__) + "/.."))
|
||||
sys.path.append(pmb_src)
|
||||
sys.path.insert(0, pmb_src)
|
||||
import pmb.chroot.apk_static
|
||||
import pmb.parse.apkindex
|
||||
import pmb.helpers.logging
|
||||
|
|
|
@ -23,7 +23,7 @@ import sys
|
|||
|
||||
# Import from parent directory
|
||||
pmb_src = os.path.realpath(os.path.join(os.path.dirname(__file__) + "/.."))
|
||||
sys.path.append(pmb_src)
|
||||
sys.path.insert(0, pmb_src)
|
||||
import pmb.aportgen.device
|
||||
import pmb.config
|
||||
import pmb.config.init
|
||||
|
|
|
@ -22,7 +22,7 @@ import sys
|
|||
|
||||
# Import from parent directory
|
||||
pmb_src = os.path.realpath(os.path.join(os.path.dirname(__file__) + "/.."))
|
||||
sys.path.append(pmb_src)
|
||||
sys.path.insert(0, pmb_src)
|
||||
import pmb.helpers.repo
|
||||
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import pytest
|
|||
|
||||
# Import from parent directory
|
||||
pmb_src = os.path.realpath(os.path.join(os.path.dirname(__file__) + "/.."))
|
||||
sys.path.append(pmb_src)
|
||||
sys.path.insert(0, pmb_src)
|
||||
import pmb.helpers.run_core
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import pytest
|
|||
|
||||
# Import from parent directory
|
||||
pmb_src = os.path.realpath(os.path.join(os.path.dirname(__file__) + "/.."))
|
||||
sys.path.append(pmb_src)
|
||||
sys.path.insert(0, pmb_src)
|
||||
import pmb.chroot.root
|
||||
import pmb.chroot.user
|
||||
import pmb.helpers.run
|
||||
|
|
|
@ -22,7 +22,7 @@ import pytest
|
|||
|
||||
# Import from parent directory
|
||||
pmb_src = os.path.realpath(os.path.join(os.path.dirname(__file__) + "/.."))
|
||||
sys.path.append(pmb_src)
|
||||
sys.path.insert(0, pmb_src)
|
||||
import pmb.helpers.git
|
||||
import pmb.helpers.logging
|
||||
import pmb.parse.version
|
||||
|
|
|
@ -20,7 +20,7 @@ import os
|
|||
import sys
|
||||
|
||||
# Import from parent directory
|
||||
sys.path.append(os.path.realpath(
|
||||
sys.path.insert(0, os.path.realpath(
|
||||
os.path.join(os.path.dirname(__file__) + "/..")))
|
||||
import pmb.parse.version
|
||||
|
||||
|
|
Loading…
Reference in New Issue