Created
July 6, 2014 15:13
-
-
Save blink1073/e8b2fd55974ac9b7ae22 to your computer and use it in GitHub Desktop.
Jedi py.test run on Windows 7 against 3264a1815e04fc208fba89440ce0c83995ab0105
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================= test session starts ============================= | |
platform win32 -- Python 2.7.7 -- py-1.4.20 -- pytest-2.5.2 | |
collected 1032 items | |
jedi/__init__.py . | |
jedi/api/__init__.py . | |
jedi/api/classes.py ..F.. | |
jedi/api/replstartup.py . | |
jedi/evaluate/docstrings.py .. | |
jedi/evaluate/finder.py .. | |
jedi/evaluate/sys_path.py . | |
jedi/parser/representation.py . | |
jedi/parser/tokenize.py . | |
test/conftest.py . | |
test/test_cache.py ..... | |
test/test_debug.py . | |
test/test_integration.py ..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F...F.........F........................................................................................................................................................................................................................................................FFFFFFFFFFFFFFFFFFFFF.FFFFFFFFFFFFFFFFFFFF.FFFFFFFFFF.FF....... | |
test/test_integration_import.py ...... | |
test/test_integration_keyword.py .. | |
test/test_jedi_system.py .. | |
test/test_regression.py F......... | |
test/test_speed.py ... | |
test/test_utils.py .......... | |
test/test_api/test_api.py ......... | |
test/test_api/test_api_classes.py ............................ | |
test/test_api/test_api_classes_follow_definition.py .... | |
test/test_api/test_call_signatures.py ............... | |
test/test_api/test_defined_names.py ....... | |
test/test_api/test_full_name.py .......... | |
test/test_api/test_interpreter.py ....... | |
test/test_api/test_unicode.py ..... | |
test/test_evaluate/test_absolute_import.py .... | |
test/test_evaluate/test_buildout_detection.py .F... | |
test/test_evaluate/test_compiled.py ..... | |
test/test_evaluate/test_docstring.py s.....s | |
test/test_evaluate/test_extension.py ... | |
test/test_evaluate/test_imports.py s. | |
test/test_evaluate/test_namespace_package.py . | |
test/test_evaluate/test_precedence.py ...... | |
test/test_evaluate/test_pyc.py s | |
test/test_parser/test_fast_parser.py .... | |
test/test_parser/test_get_code.py ss. | |
test/test_parser/test_parser.py ......... | |
test/test_parser/test_token.py .. | |
================================== FAILURES =================================== | |
____________ [doctest] jedi.api.classes.BaseDefinition.module_name ____________ | |
EXAMPLE LOCATION UNKNOWN, not showing all tests of that example | |
??? >>> print(d.module_name) # doctest: +ELLIPSIS | |
Expected: | |
json | |
Got: | |
json/__init__ | |
c:\Users\silvester\workspace\jedi\jedi\api\classes.py:None: DocTestFailure | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\goto:103] _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\goto:103:import import_tree> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x036A4300> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\goto:103:import import_tree> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\goto:103:import import_tree> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_goto_assignments(self, compare_cb): | |
result = self.script().goto_assignments() | |
comp_str = str(sorted(str(r.description) for r in result)) | |
> return compare_cb(self, comp_str, self.correct) | |
..\test\run.py:208: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\goto:103:import import_tree> | |
actual = "['module import_tree/__init__']", desired = "['module import_tree']" | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\goto:103:import import_tree> failed. | |
E actual = ['module import_tree/__init__'] | |
E desired = ['module import_tree'] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\goto:113] _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\goto:113:import import_tree.pkg> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x03D66F80> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\goto:113:import import_tree.pkg> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\goto:113:import import_tree.pkg> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_goto_assignments(self, compare_cb): | |
result = self.script().goto_assignments() | |
comp_str = str(sorted(str(r.description) for r in result)) | |
> return compare_cb(self, comp_str, self.correct) | |
..\test\run.py:208: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\goto:113:import import_tree.pkg> | |
actual = "['module pkg/__init__']", desired = "['module pkg']" | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\goto:113:import import_tree.pkg> failed. | |
E actual = ['module pkg/__init__'] | |
E desired = ['module pkg'] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\goto:138] _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\goto:138:from .imports import os> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x03D96A30> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\goto:138:from .imports import os> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\goto:138:from .imports import os> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_goto_assignments(self, compare_cb): | |
result = self.script().goto_assignments() | |
comp_str = str(sorted(str(r.description) for r in result)) | |
> return compare_cb(self, comp_str, self.correct) | |
..\test\run.py:208: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\goto:138:from .imports import os> | |
actual = '[]', desired = "['import os']" | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\goto:138:from .imports import os> failed. | |
E actual = [] | |
E desired = ['import os'] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:6] _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:6:def abc(): pass> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x043BCCD8> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:6:def abc(): pass> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:6:def abc(): pass> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:6:def abc(): pass> | |
actual = [('usages', 7, 4), ('usages', 10, 0), ('usages', 12, 0)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 7, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 10, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 12, 0)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:6:def abc(): pass> failed. | |
E actual = [('usages', 7, 4), ('usages', 10, 0), ('usages', 12, 0)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 7, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 10, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 12, 0)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:9] _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:9:abc.d.a.bsaasd.abc.d> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x042A30A8> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:9:abc.d.a.bsaasd.abc.d> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:9:abc.d.a.bsaasd.abc.d> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:9:abc.d.a.bsaasd.abc.d> | |
actual = [('usages', 7, 4), ('usages', 10, 0), ('usages', 12, 0)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 7, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 10, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 12, 0)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:9:abc.d.a.bsaasd.abc.d> failed. | |
E actual = [('usages', 7, 4), ('usages', 10, 0), ('usages', 12, 0)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 7, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 10, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 12, 0)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:23] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:23:abc> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x0440B968> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:23:abc> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:23:abc> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:23:abc> | |
actual = [('usages', 21, 0), ('usages', 24, 0)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 21, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 24, 0)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:23:abc> failed. | |
E actual = [('usages', 21, 0), ('usages', 24, 0)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 21, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 24, 0)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:29] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:29:class Abc():> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x043B9DA0> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:29:class Abc():> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:29:class Abc():> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:29:class Abc():> | |
actual = [('usages', 30, 6), ('usages', 32, 4), ('usages', 35, 8), ('usages', 47, 0)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 30, 6), ('c:\\Users\\silvester\\workspace\\jedi\\...e\\jedi\\test\\completion\\usages', 35, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 47, 0)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:29:class Abc():> failed. | |
E actual = [('usages', 30, 6), ('usages', 32, 4), ('usages', 35, 8), ('usages', 47, 0)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 30, 6), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 32, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 35, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 47, 0)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:31] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:31: Abc> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x0429C148> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:31: Abc> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:31: Abc> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:31: Abc> | |
actual = [('usages', 30, 6), ('usages', 32, 4), ('usages', 35, 8), ('usages', 47, 0)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 30, 6), ('c:\\Users\\silvester\\workspace\\jedi\\...e\\jedi\\test\\completion\\usages', 35, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 47, 0)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:31: Abc> failed. | |
E actual = [('usages', 30, 6), ('usages', 32, 4), ('usages', 35, 8), ('usages', 47, 0)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 30, 6), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 32, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 35, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 47, 0)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:37] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:37: def a(self, Abc):> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x0440A350> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:37: def a(self, Abc):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:37: def a(self, Abc):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:37: def a(self, Abc):> | |
actual = [('usages', 38, 16), ('usages', 40, 8)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 38, 16), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 40, 8)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:37: def a(self, Abc):> failed. | |
E actual = [('usages', 38, 16), ('usages', 40, 8)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 38, 16), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 40, 8)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:39] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:39: Abc> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x041273F0> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:39: Abc> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:39: Abc> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:39: Abc> | |
actual = [('usages', 38, 16), ('usages', 40, 8)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 38, 16), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 40, 8)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:39: Abc> failed. | |
E actual = [('usages', 38, 16), ('usages', 40, 8)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 38, 16), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 40, 8)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:42] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:42: def self_test(self):> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x042ADF30> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:42: def self_test(self):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:42: def self_test(self):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:42: def self_test(self):> | |
actual = [('usages', 43, 18), ('usages', 45, 8)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 43, 18), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 45, 8)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:42: def self_test(self):> failed. | |
E actual = [('usages', 43, 18), ('usages', 45, 8)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 43, 18), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 45, 8)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:44] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:44: self.b> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x0440A530> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:44: self.b> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:44: self.b> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:44: self.b> | |
actual = [('usages', 43, 18), ('usages', 45, 8)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 43, 18), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 45, 8)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:44: self.b> failed. | |
E actual = [('usages', 43, 18), ('usages', 45, 8)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 43, 18), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 45, 8)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:50] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:50:def blub():> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x04295EE0> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:50:def blub():> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:50:def blub():> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:50:def blub():> | |
actual = [('usages', 51, 4), ('usages', 55, 1)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 51, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 55, 1)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:50:def blub():> failed. | |
E actual = [('usages', 51, 4), ('usages', 55, 1)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 51, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 55, 1)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:54] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:54:@blub> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x0446B0D0> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:54:@blub> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:54:@blub> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:54:@blub> | |
actual = [('usages', 51, 4), ('usages', 55, 1)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 51, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 55, 1)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:54:@blub> failed. | |
E actual = [('usages', 51, 4), ('usages', 55, 1)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 51, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 55, 1)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:59] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:59:set_object_var = object()> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x0446D0D0> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:59:set_object_var = object()> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:59:set_object_var = object()> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:59:set_object_var = object()> | |
actual = [('usages', 60, 0), ('usages', 61, 0)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 60, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 61, 0)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:59:set_object_var = object()> failed. | |
E actual = [('usages', 60, 0), ('usages', 61, 0)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 60, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 61, 0)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:65] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:65:response = HttpResponse(mimetype='application/pdf')> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x044B8300> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:65:response = HttpResponse(mimetype='application/pdf')> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:65:response = HttpResponse(mimetype='application/pdf')> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:65:response = HttpResponse(mimetype='application/pdf')> | |
actual = [('usages', 66, 0), ('usages', 67, 0), ('usages', 68, 0), ('usages', 70, 0)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 66, 0), ('c:\\Users\\silvester\\workspace\\jedi\\...e\\jedi\\test\\completion\\usages', 68, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 70, 0)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:65:response = HttpResponse(mimetype='application/pdf')> failed. | |
E actual = [('usages', 66, 0), ('usages', 67, 0), ('usages', 68, 0), ('usages', 70, 0)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 66, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 67, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 68, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 70, 0)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:69] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:69:response> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x0429CCD8> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:69:response> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:69:response> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:69:response> | |
actual = [('usages', 66, 0), ('usages', 67, 0), ('usages', 68, 0), ('usages', 70, 0)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 66, 0), ('c:\\Users\\silvester\\workspace\\jedi\\...e\\jedi\\test\\completion\\usages', 68, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 70, 0)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:69:response> failed. | |
E actual = [('usages', 66, 0), ('usages', 67, 0), ('usages', 68, 0), ('usages', 70, 0)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 66, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 67, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 68, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 70, 0)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:76] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:76:import module_not_exists> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x044683F0> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:76:import module_not_exists> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:76:import module_not_exists> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:76:import module_not_exists> | |
actual = [('usages', 77, 7), ('usages', 80, 0)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 77, 7), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 80, 0)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:76:import module_not_exists> failed. | |
E actual = [('usages', 77, 7), ('usages', 80, 0)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 77, 7), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 80, 0)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:79] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:79:module_not_exists> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x042C9A58> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:79:module_not_exists> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:79:module_not_exists> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:79:module_not_exists> | |
actual = [('usages', 77, 7), ('usages', 80, 0)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 77, 7), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 80, 0)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:79:module_not_exists> failed. | |
E actual = [('usages', 77, 7), ('usages', 80, 0)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 77, 7), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 80, 0)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:83] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:83:from import_tree import rename1> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x044C3E18> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:83:from import_tree import rename1> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:83:from import_tree import rename1> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:83:from import_tree import rename1> | |
actual = [('rename1', 1, 0), ('rename2', 4, 5), ('usages', 84, 24), ('usages', 87, 0), ('usages', 90, 17), ('usages', 94, 17), ...] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 84, 24), ('c:\\Users\\silvester\\workspace\\jedi\...\usages', 94, 17), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 97, 17), ('rename1', 1, 0), ...] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:83:from import_tree import rename1> failed. | |
E actual = [('rename1', 1, 0), ('rename2', 4, 5), ('usages', 84, 24), ('usages', 87, 0), ('usages', 90, 17), ('usages', 94, 17), ('usages', 97, 17)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 84, 24), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 87, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 90, 17), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 94, 17), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 97, 17), ('rename1', 1, 0), ('rename2', 4, 5)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:86] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:86:rename1.abc> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x044C3E68> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:86:rename1.abc> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:86:rename1.abc> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:86:rename1.abc> | |
actual = [('rename1', 3, 0), ('rename2', 4, 20), ('rename2', 6, 0), ('usages', 87, 8), ('usages', 90, 32), ('usages', 91, 0), ...] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 87, 8), ('c:\\Users\\silvester\\workspace\\jedi\\...'c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 94, 32), ('rename1', 3, 0), ('rename2', 4, 20), ...] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:86:rename1.abc> failed. | |
E actual = [('rename1', 3, 0), ('rename2', 4, 20), ('rename2', 6, 0), ('usages', 87, 8), ('usages', 90, 32), ('usages', 91, 0), ('usages', 94, 32)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 87, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 90, 32), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 91, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 94, 32), ('rename1', 3, 0), ('rename2', 4, 20), ('rename2', 6, 0)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:89] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:89:from import_tree.rename1 import abc> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x0446FAF8> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:89:from import_tree.rename1 import abc> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:89:from import_tree.rename1 import abc> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:89:from import_tree.rename1 import abc> | |
actual = [('rename1', 3, 0), ('rename2', 4, 20), ('rename2', 6, 0), ('usages', 87, 8), ('usages', 90, 32), ('usages', 91, 0), ...] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 87, 8), ('c:\\Users\\silvester\\workspace\\jedi\\...'c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 94, 32), ('rename1', 3, 0), ('rename2', 4, 20), ...] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:89:from import_tree.rename1 import abc> failed. | |
E actual = [('rename1', 3, 0), ('rename2', 4, 20), ('rename2', 6, 0), ('usages', 87, 8), ('usages', 90, 32), ('usages', 91, 0), ('usages', 94, 32)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 87, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 90, 32), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 91, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 94, 32), ('rename1', 3, 0), ('rename2', 4, 20), ('rename2', 6, 0)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:93] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:93:from import_tree.rename1 import abc> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x044F0800> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:93:from import_tree.rename1 import abc> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:93:from import_tree.rename1 import abc> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:93:from import_tree.rename1 import abc> | |
actual = [('rename1', 1, 0), ('rename2', 4, 5), ('usages', 84, 24), ('usages', 87, 0), ('usages', 90, 17), ('usages', 94, 17), ...] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 84, 24), ('c:\\Users\\silvester\\workspace\\jedi\...\usages', 94, 17), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 97, 17), ('rename1', 1, 0), ...] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:93:from import_tree.rename1 import abc> failed. | |
E actual = [('rename1', 1, 0), ('rename2', 4, 5), ('usages', 84, 24), ('usages', 87, 0), ('usages', 90, 17), ('usages', 94, 17), ('usages', 97, 17)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 84, 24), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 87, 0), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 90, 17), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 94, 17), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 97, 17), ('rename1', 1, 0), ('rename2', 4, 5)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:96] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:96:from import_tree.rename1 import not_existing> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x04479120> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:96:from import_tree.rename1 import not_existing> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:96:from import_tree.rename1 import not_existing> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:96:from import_tree.rename1 import not_existing> | |
actual = [('usages', 97, 32)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 97, 32)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:96:from import_tree.rename1 import not_existing> failed. | |
E actual = [('usages', 97, 32)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 97, 32)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:108] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:108: def a_method(self):> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x04481F58> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:108: def a_method(self):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:108: def a_method(self):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:108: def a_method(self):> | |
actual = [('usages', 109, 8), ('usages', 111, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 109, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 111, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:108: def a_method(self):> failed. | |
E actual = [('usages', 109, 8), ('usages', 111, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 109, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 111, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:110] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:110: self.a_method()> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x044EE670> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:110: self.a_method()> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:110: self.a_method()> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:110: self.a_method()> | |
actual = [('usages', 109, 8), ('usages', 111, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 109, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 111, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:110: self.a_method()> failed. | |
E actual = [('usages', 109, 8), ('usages', 111, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 109, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 111, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:112] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:112: self.b_method()> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x044D4878> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:112: self.b_method()> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:112: self.b_method()> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:112: self.b_method()> | |
actual = [('usages', 113, 13), ('usages', 115, 8), ('usages', 116, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 113, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 115, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 116, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:112: self.b_method()> failed. | |
E actual = [('usages', 113, 13), ('usages', 115, 8), ('usages', 116, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 113, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 115, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 116, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:120] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:120: class_v = 1> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x044C8670> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:120: class_v = 1> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:120: class_v = 1> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:120: class_v = 1> | |
actual = [('usages', 121, 4), ('usages', 126, 13), ('usages', 128, 21)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 121, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 126, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 128, 21)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:120: class_v = 1> failed. | |
E actual = [('usages', 121, 4), ('usages', 126, 13), ('usages', 128, 21)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 121, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 126, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 128, 21)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:125] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:125: self.class_v> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x04478198> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:125: self.class_v> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:125: self.class_v> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:125: self.class_v> | |
actual = [('usages', 121, 4), ('usages', 126, 13), ('usages', 128, 21)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 121, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 126, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 128, 21)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:125: self.class_v> failed. | |
E actual = [('usages', 121, 4), ('usages', 126, 13), ('usages', 128, 21)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 121, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 126, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 128, 21)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:127] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:127: TestClassVar.class_v> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x044F7198> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:127: TestClassVar.class_v> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:127: TestClassVar.class_v> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:127: TestClassVar.class_v> | |
actual = [('usages', 121, 4), ('usages', 126, 13), ('usages', 128, 21)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 121, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 126, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 128, 21)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:127: TestClassVar.class_v> failed. | |
E actual = [('usages', 121, 4), ('usages', 126, 13), ('usages', 128, 21)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 121, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 126, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 128, 21)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:129] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:129: class_v> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x038193C8> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:129: class_v> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:129: class_v> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:129: class_v> | |
actual = [('usages', 123, 8), ('usages', 130, 8)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 123, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 130, 8)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:129: class_v> failed. | |
E actual = [('usages', 123, 8), ('usages', 130, 8)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 123, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 130, 8)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:134] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:134: self._instance_var = 3> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x044A8170> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:134: self._instance_var = 3> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:134: self._instance_var = 3> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:134: self._instance_var = 3> | |
actual = [('usages', 135, 13), ('usages', 139, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 135, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 139, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:134: self._instance_var = 3> failed. | |
E actual = [('usages', 135, 13), ('usages', 139, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 135, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 139, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:138] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:138: self._instance_var> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x044F70D0> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:138: self._instance_var> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:138: self._instance_var> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:138: self._instance_var> | |
actual = [('usages', 135, 13), ('usages', 139, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 135, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 139, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:138: self._instance_var> failed. | |
E actual = [('usages', 135, 13), ('usages', 139, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 135, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 139, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:156] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:156: base_class = 1> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x03882940> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:156: base_class = 1> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:156: base_class = 1> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:156: base_class = 1> | |
actual = [('usages', 157, 4), ('usages', 180, 18), ('usages', 182, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 157, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 180, 18), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 182, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:156: base_class = 1> failed. | |
E actual = [('usages', 157, 4), ('usages', 180, 18), ('usages', 182, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 157, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 180, 18), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 182, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:158] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:158: class_var = 1> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x044D6BC0> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:158: class_var = 1> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:158: class_var = 1> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:158: class_var = 1> | |
actual = [('usages', 159, 4)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 159, 4)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:158: class_var = 1> failed. | |
E actual = [('usages', 159, 4)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 159, 4)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:161] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:161: def base_method(self):> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x04481350> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:161: def base_method(self):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:161: def base_method(self):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:161: def base_method(self):> | |
actual = [('usages', 162, 8)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 162, 8)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:161: def base_method(self):> failed. | |
E actual = [('usages', 162, 8)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 162, 8)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:163] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:163: self.base_var = 1> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x044E4F30> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:163: self.base_var = 1> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:163: self.base_var = 1> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:163: self.base_var = 1> | |
actual = [('usages', 164, 13), ('usages', 184, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 164, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 184, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:163: self.base_var = 1> failed. | |
E actual = [('usages', 164, 13), ('usages', 184, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 164, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 184, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:165] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:165: self.instance_var = 1> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x0422C580> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:165: self.instance_var = 1> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:165: self.instance_var = 1> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:165: self.instance_var = 1> | |
actual = [('usages', 166, 13), ('usages', 190, 13), ('usages', 195, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 166, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 190, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 195, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:165: self.instance_var = 1> failed. | |
E actual = [('usages', 166, 13), ('usages', 190, 13), ('usages', 195, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 166, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 190, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 195, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:168] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:168: def just_a_method(self): pass> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x04481148> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:168: def just_a_method(self): pass> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:168: def just_a_method(self): pass> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:168: def just_a_method(self): pass> | |
actual = [('usages', 169, 8)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 169, 8)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:168: def just_a_method(self): pass> failed. | |
E actual = [('usages', 169, 8)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 169, 8)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:172] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:172:class TestClass(Super):> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x04463E90> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:172:class TestClass(Super):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:172:class TestClass(Super):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:172:class TestClass(Super):> | |
actual = [('usages', 155, 6), ('usages', 173, 16)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 155, 6), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 173, 16)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:172:class TestClass(Super):> failed. | |
E actual = [('usages', 155, 6), ('usages', 173, 16)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 155, 6), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 173, 16)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:174] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:174: class_var = 1> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x044C1B70> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:174: class_var = 1> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:174: class_var = 1> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:174: class_var = 1> | |
actual = [('usages', 175, 4)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 175, 4)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:174: class_var = 1> failed. | |
E actual = [('usages', 175, 4)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 175, 4)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:179] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:179: TestClass.base_class> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x0445A350> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:179: TestClass.base_class> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:179: TestClass.base_class> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:179: TestClass.base_class> | |
actual = [('usages', 157, 4), ('usages', 180, 18), ('usages', 182, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 157, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 180, 18), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 182, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:179: TestClass.base_class> failed. | |
E actual = [('usages', 157, 4), ('usages', 180, 18), ('usages', 182, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 157, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 180, 18), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 182, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:181] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:181: self.base_class> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x042CA5D0> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:181: self.base_class> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:181: self.base_class> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:181: self.base_class> | |
actual = [('usages', 157, 4), ('usages', 180, 18), ('usages', 182, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 157, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 180, 18), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 182, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:181: self.base_class> failed. | |
E actual = [('usages', 157, 4), ('usages', 180, 18), ('usages', 182, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 157, 4), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 180, 18), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 182, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:183] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:183: self.base_var> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x042A7940> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:183: self.base_var> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:183: self.base_var> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:183: self.base_var> | |
actual = [('usages', 164, 13), ('usages', 184, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 164, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 184, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:183: self.base_var> failed. | |
E actual = [('usages', 164, 13), ('usages', 184, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 164, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 184, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:189] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:189: self.instance_var = 3> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x044253A0> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:189: self.instance_var = 3> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:189: self.instance_var = 3> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:189: self.instance_var = 3> | |
actual = [('usages', 190, 13), ('usages', 195, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 190, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 195, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:189: self.instance_var = 3> failed. | |
E actual = [('usages', 190, 13), ('usages', 195, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 190, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 195, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:192] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:192: def just_a_method(self):> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x043C4F80> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:192: def just_a_method(self):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:192: def just_a_method(self):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:192: def just_a_method(self):> | |
actual = [('usages', 193, 8)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 193, 8)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:192: def just_a_method(self):> failed. | |
E actual = [('usages', 193, 8)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 193, 8)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:194] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:194: self.instance_var> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x043C18A0> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:194: self.instance_var> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:194: self.instance_var> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:194: self.instance_var> | |
actual = [('usages', 166, 13), ('usages', 190, 13), ('usages', 195, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 166, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 190, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 195, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:194: self.instance_var> failed. | |
E actual = [('usages', 166, 13), ('usages', 190, 13), ('usages', 195, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 166, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 190, 13), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 195, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:204] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:204: def prop(self):> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x0440D030> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:204: def prop(self):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:204: def prop(self):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:204: def prop(self):> | |
actual = [('usages', 205, 8), ('usages', 210, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 205, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 210, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:204: def prop(self):> failed. | |
E actual = [('usages', 205, 8), ('usages', 210, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 205, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 210, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:209] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:209: self.prop> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x0422F530> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:209: self.prop> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:209: self.prop> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:209: self.prop> | |
actual = [('usages', 205, 8), ('usages', 210, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 205, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 210, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:209: self.prop> failed. | |
E actual = [('usages', 205, 8), ('usages', 210, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 205, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 210, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:213] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:213: def rw_prop(self):> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x042954E0> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:213: def rw_prop(self):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:213: def rw_prop(self):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:213: def rw_prop(self):> | |
actual = [('usages', 214, 8), ('usages', 218, 5)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 214, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 218, 5)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:213: def rw_prop(self):> failed. | |
E actual = [('usages', 214, 8), ('usages', 218, 5)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 214, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 218, 5)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:217] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:217: @rw_prop.setter> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x042AE8C8> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:217: @rw_prop.setter> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:217: @rw_prop.setter> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:217: @rw_prop.setter> | |
actual = [('usages', 214, 8), ('usages', 218, 5)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 214, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 218, 5)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:217: @rw_prop.setter> failed. | |
E actual = [('usages', 214, 8), ('usages', 218, 5)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 214, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 218, 5)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:219] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:219: def rw_prop(self, value):> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x0403E490> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:219: def rw_prop(self, value):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:219: def rw_prop(self, value):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:219: def rw_prop(self, value):> | |
actual = [('usages', 220, 8), ('usages', 225, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 220, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 225, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:219: def rw_prop(self, value):> failed. | |
E actual = [('usages', 220, 8), ('usages', 225, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 220, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 225, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:224] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:224: self.rw_prop> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x043DA648> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:224: self.rw_prop> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:224: self.rw_prop> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:224: self.rw_prop> | |
actual = [('usages', 220, 8), ('usages', 225, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 220, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 225, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:224: self.rw_prop> failed. | |
E actual = [('usages', 220, 8), ('usages', 225, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 220, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 225, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:230] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:230:def f(**kwargs):> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x04297EB8> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:230:def f(**kwargs):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:230:def f(**kwargs):> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:230:def f(**kwargs):> | |
actual = [('usages', 231, 8), ('usages', 232, 11)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 231, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 232, 11)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:230:def f(**kwargs):> failed. | |
E actual = [('usages', 231, 8), ('usages', 232, 11)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 231, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 232, 11)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:251] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:251: instance.foo()> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x042B8EE0> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:251: instance.foo()> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:251: instance.foo()> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:251: instance.foo()> | |
actual = [('usages', 247, 8), ('usages', 252, 13)] | |
desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 247, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 252, 13)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:251: instance.foo()> failed. | |
E actual = [('usages', 247, 8), ('usages', 252, 13)] | |
E desired = [('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 247, 8), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 252, 13)] | |
..\test\test_integration.py:20: AssertionError | |
test_integration[c:\Users\silvester\workspace\jedi\test\completion\usages:262] | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:262:_sre> | |
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x042C1CB0> | |
pytestconfig = <_pytest.config.Config object at 0x0147BF90> | |
def test_integration(case, monkeypatch, pytestconfig): | |
if case.skip is not None: | |
pytest.skip(case.skip) | |
repo_root = helpers.root_dir | |
monkeypatch.chdir(os.path.join(repo_root, 'jedi')) | |
> case.run(assert_case_equal) | |
..\test\test_integration.py:28: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:262:_sre> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run(self, compare_cb): | |
testers = { | |
TEST_COMPLETIONS: self.run_completion, | |
TEST_DEFINITIONS: self.run_goto_definitions, | |
TEST_ASSIGNMENTS: self.run_goto_assignments, | |
TEST_USAGES: self.run_usages, | |
} | |
> return testers[self.test_type](compare_cb) | |
..\test\run.py:163: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:262:_sre> | |
compare_cb = <function assert_case_equal at 0x021CE870> | |
def run_usages(self, compare_cb): | |
result = self.script().usages() | |
self.correct = self.correct.strip() | |
compare = sorted((r.module_name, r.line, r.column) for r in result) | |
wanted = [] | |
if not self.correct: | |
positions = [] | |
else: | |
positions = literal_eval(self.correct) | |
for pos_tup in positions: | |
if type(pos_tup[0]) == str: | |
# this means that there is a module specified | |
wanted.append(pos_tup) | |
else: | |
line = pos_tup[0] | |
if pos_tup[0] is not None: | |
line += self.line_nr | |
wanted.append((self.module_name, line, pos_tup[1])) | |
> return compare_cb(self, compare, sorted(wanted)) | |
..\test\run.py:229: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
case = <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:262:_sre> | |
actual = [('_sre', None, None), ('usages', 260, 7), ('usages', 263, 0)] | |
desired = [('_sre', None, None), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 260, 7), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 263, 0)] | |
def assert_case_equal(case, actual, desired): | |
""" | |
Assert ``actual == desired`` with formatted message. | |
This is not needed for typical py.test use case, but as we need | |
``--assert=plain`` (see ../pytest.ini) to workaround some issue | |
due to py.test magic, let's format the message by hand. | |
""" | |
assert actual == desired, """ | |
Test %r failed. | |
actual = %s | |
desired = %s | |
> """ % (case, actual, desired) | |
E AssertionError: | |
E Test <IntegrationTestCase: c:\Users\silvester\workspace\jedi\test\completion\usages:262:_sre> failed. | |
E actual = [('_sre', None, None), ('usages', 260, 7), ('usages', 263, 0)] | |
E desired = [('_sre', None, None), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 260, 7), ('c:\\Users\\silvester\\workspace\\jedi\\test\\completion\\usages', 263, 0)] | |
..\test\test_integration.py:20: AssertionError | |
____________________ TestRegression.test_add_dynamic_mods _____________________ | |
args = (<test.test_regression.TestRegression testMethod=test_add_dynamic_mods>,) | |
kwds = {}, oldcwd = 'c:\\Users\\silvester\\workspace\\jedi' | |
repo_root = 'c:\\Users\\silvester\\workspace\\jedi' | |
@functools.wraps(func) | |
def wrapper(*args, **kwds): | |
try: | |
oldcwd = os.getcwd() | |
repo_root = os.path.dirname(test_dir) | |
os.chdir(os.path.join(repo_root, path)) | |
> return func(*args, **kwds) | |
test\helpers.py:36: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <test.test_regression.TestRegression testMethod=test_add_dynamic_mods> | |
@pytest.mark.skip('Skip for now, test case is not really supported.') | |
@cwd_at('jedi') | |
def test_add_dynamic_mods(self): | |
fname = '__main__.py' | |
api.settings.additional_dynamic_modules = [fname] | |
# Fictional module that defines a function. | |
src1 = "def r(a): return a" | |
# Other fictional modules in another place in the fs. | |
src2 = 'from .. import setup; setup.r(1)' | |
imports.load_module(os.path.abspath(fname), src2) | |
result = Script(src1, path='../setup.py').goto_definitions() | |
> assert len(result) == 1 | |
E AssertionError: assert 0 == 1 | |
E + where 0 = len([]) | |
test\test_regression.py:71: AssertionError | |
__________________________ test_parent_dir_with_file __________________________ | |
args = (), kwds = {}, oldcwd = 'c:\\Users\\silvester\\workspace\\jedi' | |
repo_root = 'c:\\Users\\silvester\\workspace\\jedi' | |
@functools.wraps(func) | |
def wrapper(*args, **kwds): | |
try: | |
oldcwd = os.getcwd() | |
repo_root = os.path.dirname(test_dir) | |
os.chdir(os.path.join(repo_root, path)) | |
> return func(*args, **kwds) | |
test\helpers.py:36: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
@cwd_at('test/test_evaluate/buildout_project/src/proj_name') | |
def test_parent_dir_with_file(): | |
parent = _get_parent_dir_with_file( | |
os.path.abspath(os.curdir), 'buildout.cfg') | |
assert parent is not None | |
> assert parent.endswith('test/test_evaluate/buildout_project') | |
E assert <built-in method endswith of str object at 0x04A24020>('test/test_evaluate/buildout_project') | |
E + where <built-in method endswith of str object at 0x04A24020> = 'c:\\Users\\silvester\\workspace\\jedi\\test\\test_evaluate\\buildout_project'.endswith | |
test\test_evaluate\test_buildout_detection.py:17: AssertionError | |
============== 59 failed, 967 passed, 6 skipped in 75.43 seconds ============== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment