mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Fix tests
This commit is contained in:
@@ -205,7 +205,7 @@ def infer_return_types(function_execution_context):
|
||||
|
||||
return ContextSet.from_sets(
|
||||
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
|
||||
).execute_annotation()
|
||||
|
||||
|
||||
@@ -91,9 +91,9 @@ def test_re_sub(Script, environment):
|
||||
|
||||
names = run("import re; re.sub('a', 'a', 'f')")
|
||||
if environment.version_info.major == 2:
|
||||
assert names == {'str', 'unicode'}
|
||||
assert names == {'str'}
|
||||
else:
|
||||
assert names == {'str', 'bytes'}
|
||||
assert names == {'str'}
|
||||
|
||||
# This param is missing because of overloading.
|
||||
names = run("import re; re.sub('a', 'a')")
|
||||
|
||||
Reference in New Issue
Block a user