mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-09 10:05:47 +08:00
Refactor something to use .type instead of isinstance.
This commit is contained in:
1 parent
689284c615
commit
6b41db96bf
4 files changed
+12
-3
No files matched your search
@@ -59,7 +59,8 @@ def test_side_effect_completion():
|
||||
_GlobalNameSpace.SideEffectContainer.foo = 1
|
||||
side_effect = get_completion('SideEffectContainer', _GlobalNameSpace.__dict__)
|
||||
|
||||
assert isinstance(side_effect._definition, mixed.MixedObject)
|
||||
# It's a class that contains MixedObject.
|
||||
assert isinstance(side_effect._definition.base, mixed.MixedObject)
|
||||
foo = get_completion('SideEffectContainer.foo', _GlobalNameSpace.__dict__)
|
||||
assert foo.name == 'foo'
|
||||
|
||||
|
||||
Reference in new issue
Block a user