mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Fix a small pytest fixture bug
This commit is contained in:
@@ -107,7 +107,9 @@ def _is_pytest_func(func_name, decorator_nodes):
|
||||
def _iter_pytest_modules(module_context):
|
||||
yield module_context
|
||||
|
||||
folder = module_context.get_value().file_io.get_parent_folder()
|
||||
file_io = module_context.get_value().file_io
|
||||
if file_io is not None:
|
||||
folder = file_io.get_parent_folder()
|
||||
sys_path = module_context.inference_state.get_sys_path()
|
||||
while any(folder.path.startswith(p) for p in sys_path):
|
||||
file_io = folder.get_file_io('conftest.py')
|
||||
|
||||
Reference in New Issue
Block a user