Debian Codegraph @

test/test_inference/test_precedence.py

raw symbols SCIP
1 from jedi.inference.compiled import CompiledValue
2
3 import pytest
4
5
6 @pytest.mark.parametrize('source', [
7 pytest.param('1 == 1'),
8 pytest.param('1.0 == 1'),
9 # Unfortunately for now not possible, because it's a typeshed object.
10 pytest.param('... == ...', marks=pytest.mark.xfail),
11 ])
12 def test_equals(Script, environment, source):
13 script = Script(source)
14 node = script._module_node.children[0]
15 first, = script._get_module_context().infer_node(node)
16 assert isinstance(first, CompiledValue) and first.get_safe_value() is True