mirror of
https://github.com/frappe/gunicorn.git
synced 2026-07-06 12:41:31 +08:00
test: add conftest.py to fix tests module import path
This commit is contained in:
parent
d85be79102
commit
35559a87bd
14
tests/conftest.py
Normal file
14
tests/conftest.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#
|
||||||
|
# This file is part of gunicorn released under the MIT license.
|
||||||
|
# See the NOTICE for more information.
|
||||||
|
|
||||||
|
"""Pytest configuration for gunicorn tests."""
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# Add the tests directory to sys.path so test support modules can be imported
|
||||||
|
# as 'tests.module_name' (e.g., 'tests.support_dirty_apps:CounterApp')
|
||||||
|
tests_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
if tests_dir not in sys.path:
|
||||||
|
sys.path.insert(0, tests_dir)
|
||||||
Loading…
x
Reference in New Issue
Block a user