From 074384e3048590bb0568df98ba40f23f17df06a1 Mon Sep 17 00:00:00 2001 From: laggykiller Date: Mon, 10 Feb 2025 02:21:43 +0800 Subject: [PATCH] No need to set PYTHONPATH before testing --- .github/workflows/pythonpackage.yml | 5 +---- tests/__main__.py | 3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 9bde06c..c26570c 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -51,7 +51,6 @@ jobs: run: | python -m pip install dist/sqlcipher3_wheels-*.tar.gz mv sqlcipher3 sqlcipher3_ && - PYTHONPATH=.:$PYTHONPATH python tests/ && mv sqlcipher3_ sqlcipher3 - uses: actions/upload-artifact@v4 @@ -160,9 +159,7 @@ jobs: CIBW_BUILD_FRONTEND: build CIBW_BUILD: ${{ matrix.cibw_build }} CIBW_ARCHS: ${{ matrix.cibw_archs }} - CIBW_ENVIRONMENT: > - SQLCIPHER3_COMPILE_TARGET=${{ matrix.compile_target }} - PYTHONPATH={project}:$PYTHONPATH + CIBW_ENVIRONMENT: SQLCIPHER3_COMPILE_TARGET=${{ matrix.compile_target }} CIBW_TEST_COMMAND: > mv {project}/sqlcipher3 {project}/sqlcipher3_ && python {project}/tests/ && diff --git a/tests/__main__.py b/tests/__main__.py index 1a43df9..7f37f12 100644 --- a/tests/__main__.py +++ b/tests/__main__.py @@ -1,6 +1,9 @@ import optparse import sys import unittest +from os.path import dirname + +sys.path.append(dirname(dirname(__file__))) from tests.backup import suite as backup_suite from tests.dbapi import suite as dbapi_suite