From 054bf8a3e7a049df7087c324fa87e8effbaf5bdc Mon Sep 17 00:00:00 2001 From: foolcage <5533061@qq.com> Date: Mon, 27 Dec 2021 01:09:03 +0800 Subject: [PATCH] fix tests --- tests/__init__.py | 3 +++ tests/context.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/__init__.py b/tests/__init__.py index e351e056..7a30a3d5 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,5 +1,8 @@ # -*- coding: utf-8 -*- import os +import sys os.environ.setdefault("TESTING_ZVT", "True") os.environ.setdefault("SQLALCHEMY_WARN_20", "1") + +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../src"))) diff --git a/tests/context.py b/tests/context.py index f8e22dea..adc0a213 100644 --- a/tests/context.py +++ b/tests/context.py @@ -5,4 +5,4 @@ def init_test_context(): import os import sys - sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) + sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../src")))