Skip to content

Commit d9669a8

Browse files
authored
Fix misspelling of 'Rakiura'. (#5869)
Fix misspelling of 'Rakiura'.
1 parent b6efda4 commit d9669a8

File tree

8 files changed

+48
-48
lines changed

8 files changed

+48
-48
lines changed

tests/integration/tui/conftest.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ def format_test_failure(expected, got, description):
6868
'''
6969

7070

71-
class RaikuraSession:
72-
"""Convenience class for accessing Raikura functionality."""
71+
class RakiuraSession:
72+
"""Convenience class for accessing Rakiura functionality."""
7373

7474
def __init__(self, app, html_fragment, test_dir, test_name):
7575
self.app = app
@@ -177,7 +177,7 @@ def force_update(self):
177177
This is done automatically by compare_screenshot but you may want to
178178
call it in a test, e.g. before pressing navigation keys.
179179
180-
With Raikura, the Tui event loop is not running so the data is never
180+
With Rakiura, the Tui event loop is not running so the data is never
181181
refreshed.
182182
183183
You do NOT need to call this method for key presses, but you do need to
@@ -215,16 +215,16 @@ def wait_until_loaded(self, *ids, retries=20):
215215

216216

217217
@pytest.fixture
218-
def raikura(test_dir, request, monkeypatch):
218+
def rakiura(test_dir, request, monkeypatch):
219219
"""Visual regression test framework for Urwid apps.
220220
221221
Like Cypress but for Tui so named after a NZ island with lots of Tuis.
222222
223-
When called this yields a RaikuraSession object loaded with test
223+
When called this yields a RakiuraSession object loaded with test
224224
utilities. All tests have default retries to avoid flaky tests.
225225
226226
Similar to the "start" fixture, which starts a Scheduler without running
227-
the main loop, raikura starts Tui without running the main loop.
227+
the main loop, rakiura starts Tui without running the main loop.
228228
229229
Arguments:
230230
workflow_id:
@@ -234,25 +234,25 @@ def raikura(test_dir, request, monkeypatch):
234234
separated string e.g. "80,50" for 80 cols wide by 50 rows tall.
235235
236236
Returns:
237-
A RaikuraSession context manager which provides useful utilities for
237+
A RakiuraSession context manager which provides useful utilities for
238238
testing.
239239
240240
"""
241-
return _raikura(test_dir, request, monkeypatch)
241+
return _rakiura(test_dir, request, monkeypatch)
242242

243243

244244
@pytest.fixture
245-
def mod_raikura(test_dir, request, monkeypatch):
246-
"""Same as raikura but configured to view module-scoped workflows.
245+
def mod_rakiura(test_dir, request, monkeypatch):
246+
"""Same as rakiura but configured to view module-scoped workflows.
247247
248248
Note: This is *not* a module-scoped fixture (no need, creating Tui sessions
249249
is not especially slow), it is configured to display module-scoped
250250
"scheduler" fixtures (which may be more expensive to create/destroy).
251251
"""
252-
return _raikura(test_dir.parent, request, monkeypatch)
252+
return _rakiura(test_dir.parent, request, monkeypatch)
253253

254254

255-
def _raikura(test_dir, request, monkeypatch):
255+
def _rakiura(test_dir, request, monkeypatch):
256256
# make the workflow and scan update intervals match (more reliable)
257257
# and speed things up a little whilst we're at it
258258
monkeypatch.setattr(
@@ -289,19 +289,19 @@ def get_display_id(id_):
289289
workflow_filter = re.escape(id_base) + r'/.*'
290290

291291
@contextmanager
292-
def _raikura(workflow_id=None, size='80,50'):
292+
def _rakiura(workflow_id=None, size='80,50'):
293293
screen, html_fragment = configure_screenshot(size)
294294
app = TuiApp(screen=screen)
295295
with app.main(
296296
workflow_id,
297297
id_filter=workflow_filter,
298298
interactive=False,
299299
):
300-
yield RaikuraSession(
300+
yield RakiuraSession(
301301
app,
302302
html_fragment,
303303
test_dir,
304304
request.function.__name__,
305305
)
306306

307-
return _raikura
307+
return _rakiura
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/integration/tui/test_app.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,37 +46,37 @@ def set_task_state(schd, task_states):
4646
)
4747

4848

49-
async def test_tui_basics(raikura):
49+
async def test_tui_basics(rakiura):
5050
"""Test basic Tui interaction with no workflows."""
51-
with raikura(size='80,40') as rk:
51+
with rakiura(size='80,40') as rk:
5252
# the app should open
53-
rk.compare_screenshot('test-raikura', 'the app should have loaded')
53+
rk.compare_screenshot('test-rakiura', 'the app should have loaded')
5454

5555
# "h" should bring up the onscreen help
5656
rk.user_input('h')
5757
rk.compare_screenshot(
58-
'test-raikura-help',
58+
'test-rakiura-help',
5959
'the help screen should be visible'
6060
)
6161

6262
# "q" should close the popup
6363
rk.user_input('q')
6464
rk.compare_screenshot(
65-
'test-raikura',
65+
'test-rakiura',
6666
'the help screen should have closed',
6767
)
6868

6969
# "enter" should bring up the context menu
7070
rk.user_input('enter')
7171
rk.compare_screenshot(
72-
'test-raikura-enter',
72+
'test-rakiura-enter',
7373
'the context menu should have opened',
7474
)
7575

7676
# "enter" again should close it via the "cancel" button
7777
rk.user_input('enter')
7878
rk.compare_screenshot(
79-
'test-raikura',
79+
'test-rakiura',
8080
'the context menu should have closed',
8181
)
8282

@@ -89,13 +89,13 @@ async def test_tui_basics(raikura):
8989
rk.user_input('q')
9090

9191

92-
async def test_subscribe_unsubscribe(one_conf, flow, scheduler, start, raikura):
92+
async def test_subscribe_unsubscribe(one_conf, flow, scheduler, start, rakiura):
9393
"""Test a simple workflow with one task."""
9494
id_ = flow(one_conf, name='one')
9595
schd = scheduler(id_)
9696
async with start(schd):
9797
await schd.update_data_structure()
98-
with raikura(size='80,15') as rk:
98+
with rakiura(size='80,15') as rk:
9999
rk.compare_screenshot(
100100
'unsubscribed',
101101
'the workflow should be collapsed'
@@ -120,7 +120,7 @@ async def test_subscribe_unsubscribe(one_conf, flow, scheduler, start, raikura):
120120
)
121121

122122

123-
async def test_workflow_states(one_conf, flow, scheduler, start, raikura):
123+
async def test_workflow_states(one_conf, flow, scheduler, start, rakiura):
124124
"""Test viewing multiple workflows in different states."""
125125
# one => stopping
126126
id_1 = flow(one_conf, name='one')
@@ -137,7 +137,7 @@ async def test_workflow_states(one_conf, flow, scheduler, start, raikura):
137137

138138
async with start(schd_2):
139139
await schd_2.update_data_structure()
140-
with raikura(size='80,15') as rk:
140+
with rakiura(size='80,15') as rk:
141141
rk.compare_screenshot(
142142
'unfiltered',
143143
'All workflows should be visible (one, two, tree)',
@@ -193,7 +193,7 @@ async def test_workflow_states(one_conf, flow, scheduler, start, raikura):
193193
# TODO: Task state filtering is currently broken
194194
# see: https://github.com/cylc/cylc-flow/issues/5716
195195
#
196-
# async def test_task_states(flow, scheduler, start, raikura):
196+
# async def test_task_states(flow, scheduler, start, rakiura):
197197
# id_ = flow({
198198
# 'scheduler': {
199199
# 'allow implicit tasks': 'true',
@@ -224,15 +224,15 @@ async def test_workflow_states(one_conf, flow, scheduler, start, raikura):
224224
# )
225225
# await schd.update_data_structure()
226226
#
227-
# with raikura(schd.tokens.id, size='80,20') as rk:
227+
# with rakiura(schd.tokens.id, size='80,20') as rk:
228228
# rk.compare_screenshot('unfiltered')
229229
#
230230
# # filter out waiting tasks
231231
# rk.user_input('T', 'down', 'enter', 'q')
232232
# rk.compare_screenshot('filter-not-waiting')
233233

234234

235-
async def test_navigation(flow, scheduler, start, raikura):
235+
async def test_navigation(flow, scheduler, start, rakiura):
236236
"""Test navigating with the arrow keys."""
237237
id_ = flow({
238238
'scheduling': {
@@ -257,7 +257,7 @@ async def test_navigation(flow, scheduler, start, raikura):
257257
async with start(schd):
258258
await schd.update_data_structure()
259259

260-
with raikura(size='80,30') as rk:
260+
with rakiura(size='80,30') as rk:
261261
# wait for the workflow to appear (collapsed)
262262
rk.wait_until_loaded('#spring')
263263

@@ -291,7 +291,7 @@ async def test_navigation(flow, scheduler, start, raikura):
291291
)
292292

293293

294-
async def test_auto_expansion(flow, scheduler, start, raikura):
294+
async def test_auto_expansion(flow, scheduler, start, rakiura):
295295
"""It should automatically expand cycles and top-level families.
296296
297297
When a workflow is expanded, Tui should auto expand cycles and top-level
@@ -314,7 +314,7 @@ async def test_auto_expansion(flow, scheduler, start, raikura):
314314
},
315315
}, name='one')
316316
schd = scheduler(id_)
317-
with raikura(size='80,20') as rk:
317+
with rakiura(size='80,20') as rk:
318318
async with start(schd):
319319
await schd.update_data_structure()
320320
# wait for the workflow to appear (collapsed)
@@ -342,15 +342,15 @@ async def test_auto_expansion(flow, scheduler, start, raikura):
342342
)
343343

344344

345-
async def test_restart_reconnect(one_conf, flow, scheduler, start, raikura):
345+
async def test_restart_reconnect(one_conf, flow, scheduler, start, rakiura):
346346
"""It should handle workflow shutdown and restart.
347347
348348
The Cylc client can raise exceptions e.g. WorkflowStopped. Any text written
349349
to stdout/err will mess with Tui. The purpose of this test is to ensure Tui
350350
can handle shutdown / restart without any errors occuring and any spurious
351351
text appearing on the screen.
352352
"""
353-
with raikura(size='80,20') as rk:
353+
with rakiura(size='80,20') as rk:
354354
schd = scheduler(flow(one_conf, name='one'))
355355

356356
# 1- start the workflow

tests/integration/tui/test_logs.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,11 @@ async def workflow(mod_flow, mod_scheduler, mod_start, standarise_host_and_path)
196196

197197
async def test_scheduler_logs(
198198
workflow,
199-
mod_raikura,
199+
mod_rakiura,
200200
wait_log_loaded,
201201
):
202202
"""Test viewing the scheduler log files."""
203-
with mod_raikura(size='80,30') as rk:
203+
with mod_rakiura(size='80,30') as rk:
204204
# wait for the workflow to appear (collapsed)
205205
rk.wait_until_loaded('#spring')
206206

@@ -239,14 +239,14 @@ async def test_scheduler_logs(
239239

240240
async def test_task_logs(
241241
workflow,
242-
mod_raikura,
242+
mod_rakiura,
243243
wait_log_loaded,
244244
):
245245
"""Test viewing task log files.
246246
247247
I.E. Test viewing job log files by opening the log view on a task.
248248
"""
249-
with mod_raikura(size='80,30') as rk:
249+
with mod_rakiura(size='80,30') as rk:
250250
# wait for the workflow to appear (collapsed)
251251
rk.wait_until_loaded('#spring')
252252

@@ -280,14 +280,14 @@ async def test_task_logs(
280280

281281
async def test_job_logs(
282282
workflow,
283-
mod_raikura,
283+
mod_rakiura,
284284
wait_log_loaded,
285285
):
286286
"""Test viewing the job log files.
287287
288288
I.E. Test viewing job log files by opening the log view on a job.
289289
"""
290-
with mod_raikura(size='80,30') as rk:
290+
with mod_rakiura(size='80,30') as rk:
291291
# wait for the workflow to appear (collapsed)
292292
rk.wait_until_loaded('#spring')
293293

@@ -325,7 +325,7 @@ async def test_job_logs(
325325

326326
async def test_errors(
327327
workflow,
328-
mod_raikura,
328+
mod_rakiura,
329329
wait_log_loaded,
330330
monkeypatch,
331331
):
@@ -339,7 +339,7 @@ def cli_cmd_fail(*args, **kwargs):
339339
cli_cmd_fail,
340340
)
341341

342-
with mod_raikura(size='80,30') as rk:
342+
with mod_rakiura(size='80,30') as rk:
343343
# wait for the workflow to appear (collapsed)
344344
rk.wait_until_loaded('#spring')
345345

tests/integration/tui/test_mutations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ async def test_online_mutation(
3535
flow,
3636
scheduler,
3737
start,
38-
raikura,
38+
rakiura,
3939
monkeypatch,
4040
):
4141
"""Test a simple workflow with one task."""
4242
id_ = flow(one_conf, name='one')
4343
schd = scheduler(id_)
44-
with raikura(size='80,15') as rk:
44+
with rakiura(size='80,15') as rk:
4545
async with start(schd):
4646
await schd.update_data_structure()
4747
assert schd.command_queue.empty()
@@ -157,14 +157,14 @@ def returncode(self):
157157
async def test_offline_mutation(
158158
one_conf,
159159
flow,
160-
raikura,
160+
rakiura,
161161
capture_commands,
162162
standardise_cli_cmds,
163163
):
164164
id_ = flow(one_conf, name='one')
165165
commands, returncode = capture_commands
166166

167-
with raikura(size='80,15') as rk:
167+
with rakiura(size='80,15') as rk:
168168
# run the stop-all mutation
169169
rk.wait_until_loaded('root')
170170
rk.user_input('enter', 'down')

tests/integration/tui/test_show.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from cylc.flow.tui.data import _show
2020

2121

22-
async def test_show(flow, scheduler, start, raikura, monkeypatch):
22+
async def test_show(flow, scheduler, start, rakiura, monkeypatch):
2323
"""Test "cylc show" support in Tui."""
2424
id_ = flow({
2525
'scheduling': {
@@ -40,7 +40,7 @@ async def test_show(flow, scheduler, start, raikura, monkeypatch):
4040
async with start(schd):
4141
await schd.update_data_structure()
4242

43-
with raikura(size='80,40') as rk:
43+
with rakiura(size='80,40') as rk:
4444
rk.user_input('down', 'right')
4545
rk.wait_until_loaded(schd.tokens.id)
4646

0 commit comments

Comments
 (0)