@@ -13,25 +13,25 @@ async def test_apply_full_change_should_work() -> None:
13
13
text = """first"""
14
14
new_text = """changed"""
15
15
document = TextDocument (document_uri = "file://test.robot" , language_id = "robotframework" , version = 1 , text = text )
16
- assert await document .text () == text
16
+ assert document .text == text
17
17
18
18
await document .apply_full_change (1 , new_text )
19
19
20
- assert await document .text () == new_text
20
+ assert document .text == new_text
21
21
22
22
23
23
@pytest .mark .asyncio
24
24
async def test_apply_apply_incremental_change_at_begining_should_work () -> None :
25
25
text = """first"""
26
26
new_text = """changed"""
27
27
document = TextDocument (document_uri = "file://test.robot" , language_id = "robotframework" , version = 1 , text = text )
28
- assert await document .text () == text
28
+ assert document .text == text
29
29
30
30
await document .apply_incremental_change (
31
31
1 , Range (start = Position (line = 0 , character = 0 ), end = Position (line = 0 , character = 0 )), new_text
32
32
)
33
33
34
- assert await document .text () == new_text + text
34
+ assert document .text == new_text + text
35
35
36
36
37
37
@pytest .mark .asyncio
@@ -40,13 +40,13 @@ async def test_apply_apply_incremental_change_at_end_should_work() -> None:
40
40
new_text = """changed"""
41
41
42
42
document = TextDocument (document_uri = "file://test.robot" , language_id = "robotframework" , version = 1 , text = text )
43
- assert await document .text () == text
43
+ assert document .text == text
44
44
45
45
await document .apply_incremental_change (
46
46
1 , Range (start = Position (line = 0 , character = len (text )), end = Position (line = 0 , character = len (text ))), new_text
47
47
)
48
48
49
- assert await document .text () == text + new_text
49
+ assert document .text == text + new_text
50
50
51
51
52
52
@pytest .mark .asyncio
@@ -55,21 +55,21 @@ async def test_save_and_revert_should_work() -> None:
55
55
new_text = """changed"""
56
56
57
57
document = TextDocument (document_uri = "file://test.robot" , language_id = "robotframework" , version = 1 , text = text )
58
- assert await document .text () == text
58
+ assert document .text == text
59
59
60
60
assert not await document .revert (None )
61
61
62
62
await document .apply_incremental_change (
63
63
2 , Range (start = Position (line = 0 , character = len (text )), end = Position (line = 0 , character = len (text ))), new_text
64
64
)
65
65
66
- assert await document .text () == text + new_text
66
+ assert document .text == text + new_text
67
67
assert document .version == 2
68
68
69
69
assert await document .revert (None )
70
70
assert not await document .revert (None )
71
71
72
- assert await document .text () == text
72
+ assert document .text == text
73
73
assert document .version == 1
74
74
75
75
await document .apply_incremental_change (
@@ -78,7 +78,7 @@ async def test_save_and_revert_should_work() -> None:
78
78
79
79
await document .save (None , None )
80
80
81
- assert await document .text () == text + new_text
81
+ assert document .text == text + new_text
82
82
assert document .version == 2
83
83
84
84
@@ -95,13 +95,13 @@ async def test_apply_apply_incremental_change_in_the_middle_should_work() -> Non
95
95
third"""
96
96
97
97
document = TextDocument (document_uri = "file://test.robot" , language_id = "robotframework" , version = 1 , text = text )
98
- assert await document .text () == text
98
+ assert document .text == text
99
99
100
100
await document .apply_incremental_change (
101
101
1 , Range (start = Position (line = 1 , character = 7 ), end = Position (line = 1 , character = 7 )), new_text
102
102
)
103
103
104
- assert await document .text () == expected
104
+ assert document .text == expected
105
105
106
106
107
107
@pytest .mark .asyncio
@@ -113,13 +113,13 @@ async def test_apply_apply_incremental_change_with_start_line_eq_len_lines_shoul
113
113
new_text = """changed """
114
114
115
115
document = TextDocument (document_uri = "file://test.robot" , language_id = "robotframework" , version = 1 , text = text )
116
- assert await document .text () == text
116
+ assert document .text == text
117
117
118
118
await document .apply_incremental_change (
119
119
1 , Range (start = Position (line = 3 , character = 7 ), end = Position (line = 3 , character = 8 )), new_text
120
120
)
121
121
122
- assert await document .text () == text + new_text
122
+ assert document .text == text + new_text
123
123
124
124
125
125
@pytest .mark .asyncio
@@ -128,7 +128,7 @@ async def test_apply_apply_incremental_change_with_wrong_range_should_raise_inva
128
128
new_text = """changed"""
129
129
130
130
document = TextDocument (document_uri = "file://test.robot" , language_id = "robotframework" , version = 1 , text = text )
131
- assert await document .text () == text
131
+ assert document .text == text
132
132
133
133
with pytest .raises (InvalidRangeError ):
134
134
await document .apply_incremental_change (
@@ -141,11 +141,11 @@ async def test_apply_none_change_should_work() -> None:
141
141
text = """first"""
142
142
143
143
document = TextDocument (document_uri = "file://test.robot" , language_id = "robotframework" , version = 1 , text = text )
144
- assert await document .text () == text
144
+ assert document .text == text
145
145
146
146
await document .apply_none_change ()
147
147
148
- assert await document .text () == text
148
+ assert document .text == text
149
149
150
150
151
151
@pytest .mark .asyncio
@@ -157,7 +157,7 @@ async def test_lines_should_give_the_lines_of_the_document() -> None:
157
157
"""
158
158
159
159
document = TextDocument (document_uri = "file://test.robot" , language_id = "robotframework" , version = 1 , text = text )
160
- assert await document .text () == text
160
+ assert document .text == text
161
161
162
162
await document .apply_none_change ()
163
163
0 commit comments