From 19419b3c10f0a7e079d6b6b7466516f4ec756f88 Mon Sep 17 00:00:00 2001 From: Daniel Biehl Date: Fri, 22 Dec 2023 00:19:48 +0100 Subject: [PATCH] test: try to stablize regression tests --- ...s.test[references.robot-011-016-a_custom_library].out | 9 +++++++++ ...s.test[references.robot-011-020-a_custom_library].out | 9 +++++++++ ...s.test[references.robot-011-023-a_custom_library].out | 9 +++++++++ ...t[references.robot-013-016-a_same_custom_library].out | 9 +++++++++ ...t[references.robot-013-020-a_same_custom_library].out | 9 +++++++++ ...t[references.robot-013-023-a_same_custom_library].out | 9 +++++++++ .../robotframework/parts/test_references.py | 4 ++-- 7 files changed, 56 insertions(+), 2 deletions(-) diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-011-016-a_custom_library].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-011-016-a_custom_library].out index b1439e05a..22095fc74 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-011-016-a_custom_library].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-011-016-a_custom_library].out @@ -66,6 +66,15 @@ result: character: 11 line: 1 uri: tests/external_libray.robot +- !Location + range: + end: + character: 12 + line: 6 + start: + character: 4 + line: 6 + uri: tests/external_libray.robot - !Location range: end: diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-011-020-a_custom_library].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-011-020-a_custom_library].out index 593481a6a..5f63357c1 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-011-020-a_custom_library].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-011-020-a_custom_library].out @@ -66,6 +66,15 @@ result: character: 11 line: 1 uri: tests/external_libray.robot +- !Location + range: + end: + character: 12 + line: 6 + start: + character: 4 + line: 6 + uri: tests/external_libray.robot - !Location range: end: diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-011-023-a_custom_library].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-011-023-a_custom_library].out index 5d68496c7..0c0ebfd12 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-011-023-a_custom_library].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-011-023-a_custom_library].out @@ -66,6 +66,15 @@ result: character: 11 line: 1 uri: tests/external_libray.robot +- !Location + range: + end: + character: 12 + line: 6 + start: + character: 4 + line: 6 + uri: tests/external_libray.robot - !Location range: end: diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-013-016-a_same_custom_library].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-013-016-a_same_custom_library].out index 9cfd35811..f9a0caa4a 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-013-016-a_same_custom_library].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-013-016-a_same_custom_library].out @@ -66,6 +66,15 @@ result: character: 11 line: 1 uri: tests/external_libray.robot +- !Location + range: + end: + character: 12 + line: 6 + start: + character: 4 + line: 6 + uri: tests/external_libray.robot - !Location range: end: diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-013-020-a_same_custom_library].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-013-020-a_same_custom_library].out index aa48143f6..a10a2b8ae 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-013-020-a_same_custom_library].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-013-020-a_same_custom_library].out @@ -66,6 +66,15 @@ result: character: 11 line: 1 uri: tests/external_libray.robot +- !Location + range: + end: + character: 12 + line: 6 + start: + character: 4 + line: 6 + uri: tests/external_libray.robot - !Location range: end: diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-013-023-a_same_custom_library].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-013-023-a_same_custom_library].out index 198ed3230..bd631f9d6 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-013-023-a_same_custom_library].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_references.test[references.robot-013-023-a_same_custom_library].out @@ -66,6 +66,15 @@ result: character: 11 line: 1 uri: tests/external_libray.robot +- !Location + range: + end: + character: 12 + line: 6 + start: + character: 4 + line: 6 + uri: tests/external_libray.robot - !Location range: end: diff --git a/tests/robotcode/language_server/robotframework/parts/test_references.py b/tests/robotcode/language_server/robotframework/parts/test_references.py index 49c77c4cf..be6f29a6b 100644 --- a/tests/robotcode/language_server/robotframework/parts/test_references.py +++ b/tests/robotcode/language_server/robotframework/parts/test_references.py @@ -27,7 +27,7 @@ generate_tests_from_source_document(Path(Path(__file__).parent, "data/tests/references.robot")), indirect=["test_document"], ids=generate_test_id, - scope="session", + scope="module", ) @pytest.mark.usefixtures("protocol") @pytest.mark.asyncio() @@ -40,7 +40,7 @@ async def test( def split(location: Location) -> Location: return Location("/".join(location.uri.split("/")[-2:]), location.range) - await protocol.diagnostics.ensure_workspace_loaded() + await protocol.diagnostics.workspace_loaded_event.wait(1200) result = await asyncio.wait_for( protocol.robot_references.collect(