From 90023a3a70325f5d5a7b6e8fe724ec9c94047844 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Sat, 6 Jun 2020 20:26:50 +0200 Subject: [PATCH] fix logic for test --- cibuildwheel/__main__.py | 2 +- unit_test/main_tests/conftest.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index 583abaa8..804ec31a 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -119,7 +119,7 @@ def main() -> None: test_requires = get_option_from_environment('CIBW_TEST_REQUIRES', platform=platform, default='').split() test_extras = get_option_from_environment('CIBW_TEST_EXTRAS', platform=platform, default='') package_dir = args.package_dir - if not package_dir.startswith("."): + if not (os.path.isabs(package_dir) or package_dir.startswith(".")): package_dir = os.path.join(".", package_dir) before_build = get_option_from_environment('CIBW_BEFORE_BUILD', platform=platform) build_verbosity_str = get_option_from_environment('CIBW_BUILD_VERBOSITY', platform=platform, default='') diff --git a/unit_test/main_tests/conftest.py b/unit_test/main_tests/conftest.py index cd896915..ddef7e3d 100644 --- a/unit_test/main_tests/conftest.py +++ b/unit_test/main_tests/conftest.py @@ -18,7 +18,7 @@ class ArgsInterceptor: self.kwargs = kwargs -MOCK_PACKAGE_DIR = 'some_package_dir' +MOCK_PACKAGE_DIR = './some_package_dir' @pytest.fixture(autouse=True)