mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-18 11:35:57 +08:00
Fix tests
This commit is contained in:
@@ -205,7 +205,7 @@ def infer_return_types(function_execution_context):
|
|||||||
|
|
||||||
return ContextSet.from_sets(
|
return ContextSet.from_sets(
|
||||||
ann.define_generics(type_var_dict)
|
ann.define_generics(type_var_dict)
|
||||||
if isinstance(ann, (AbstractAnnotatedClass, TypeVar)) else ann
|
if isinstance(ann, (AbstractAnnotatedClass, TypeVar)) else ContextSet({ann})
|
||||||
for ann in annotation_contexts
|
for ann in annotation_contexts
|
||||||
).execute_annotation()
|
).execute_annotation()
|
||||||
|
|
||||||
|
|||||||
@@ -91,9 +91,9 @@ def test_re_sub(Script, environment):
|
|||||||
|
|
||||||
names = run("import re; re.sub('a', 'a', 'f')")
|
names = run("import re; re.sub('a', 'a', 'f')")
|
||||||
if environment.version_info.major == 2:
|
if environment.version_info.major == 2:
|
||||||
assert names == {'str', 'unicode'}
|
assert names == {'str'}
|
||||||
else:
|
else:
|
||||||
assert names == {'str', 'bytes'}
|
assert names == {'str'}
|
||||||
|
|
||||||
# This param is missing because of overloading.
|
# This param is missing because of overloading.
|
||||||
names = run("import re; re.sub('a', 'a')")
|
names = run("import re; re.sub('a', 'a')")
|
||||||
|
|||||||
Reference in New Issue
Block a user