mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Fix transform_path_to_dotted tests on Windows
Compiled modules end with the .pyd extension on Windows.
This commit is contained in:
@@ -13,14 +13,20 @@ else:
|
||||
TestCase = unittest.TestCase
|
||||
|
||||
import os
|
||||
import pytest
|
||||
from os.path import abspath, dirname, join
|
||||
import functools
|
||||
from functools import partial, wraps
|
||||
|
||||
test_dir = dirname(abspath(__file__))
|
||||
root_dir = dirname(test_dir)
|
||||
|
||||
sample_int = 1 # This is used in completion/imports.py
|
||||
|
||||
skip_if_windows = partial(pytest.param,
|
||||
marks=pytest.mark.skipif("sys.platform=='win32'"))
|
||||
skip_if_not_windows = partial(pytest.param,
|
||||
marks=pytest.mark.skipif("sys.platform!='win32'"))
|
||||
|
||||
|
||||
def get_example_dir(name):
|
||||
return join(test_dir, 'examples', name)
|
||||
@@ -34,7 +40,7 @@ def cwd_at(path):
|
||||
:arg path: relative path from repository root (e.g., ``'jedi'``).
|
||||
"""
|
||||
def decorator(func):
|
||||
@functools.wraps(func)
|
||||
@wraps(func)
|
||||
def wrapper(Script, **kwargs):
|
||||
with set_cwd(path):
|
||||
return func(Script, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user