10
10
from genie_python .genie_script_checker import ScriptChecker
11
11
from genie_python .testing_utils .script_checker import CreateTempScriptAndReturnErrors
12
12
from hamcrest import assert_that , is_ , is_in
13
-
14
13
from utilities .utilities import (
15
14
check_block_exists ,
16
15
g , # type: ignore
@@ -240,9 +239,7 @@ def test_GIVEN_waiting_for_exact_value_on_block_WHEN_block_reaches_value_THEN_wa
240
239
args = (self .wait_before , self .wait_after , self .pv_name , value_to_wait_for ),
241
240
)
242
241
set_pv_thread .start ()
243
- g .waitfor_block (
244
- block = self .block_name , value = value_to_wait_for , maxwait = self .max_wait
245
- )
242
+ g .waitfor_block (block = self .block_name , value = value_to_wait_for , maxwait = self .max_wait )
246
243
247
244
assert_that (
248
245
set_pv_thread .is_alive (),
@@ -261,9 +258,7 @@ def test_GIVEN_waiting_for_exact_value_on_block_WHEN_block_wrong_value_THEN_time
261
258
args = (self .wait_before , self .wait_after , self .pv_name , wrong_value ),
262
259
)
263
260
set_pv_thread .start ()
264
- g .waitfor_block (
265
- block = self .block_name , value = value_to_wait_for , maxwait = self .max_wait
266
- )
261
+ g .waitfor_block (block = self .block_name , value = value_to_wait_for , maxwait = self .max_wait )
267
262
268
263
assert_that (
269
264
set_pv_thread .is_alive (),
@@ -332,9 +327,7 @@ def test_GIVEN_waiting_for_value_below_high_limit_on_block_WHEN_block_enters_ran
332
327
args = (self .wait_before , self .wait_after , self .pv_name , value_in_range ),
333
328
)
334
329
set_pv_thread .start ()
335
- g .waitfor_block (
336
- block = self .block_name , highlimit = high_limit , maxwait = self .max_wait
337
- )
330
+ g .waitfor_block (block = self .block_name , highlimit = high_limit , maxwait = self .max_wait )
338
331
339
332
assert_that (
340
333
set_pv_thread .is_alive (),
@@ -353,9 +346,7 @@ def test_GIVEN_waiting_for_value_below_high_limit_on_block_WHEN_block_above_limi
353
346
args = (self .wait_before , self .wait_after , self .pv_name , wrong_value ),
354
347
)
355
348
set_pv_thread .start ()
356
- g .waitfor_block (
357
- block = self .block_name , highlimit = high_limit , maxwait = self .max_wait
358
- )
349
+ g .waitfor_block (block = self .block_name , highlimit = high_limit , maxwait = self .max_wait )
359
350
360
351
assert_that (
361
352
set_pv_thread .is_alive (),
@@ -374,9 +365,7 @@ def test_GIVEN_waiting_for_value_above_low_limit_on_block_WHEN_block_enters_rang
374
365
args = (self .wait_before , self .wait_after , self .pv_name , value_in_range ),
375
366
)
376
367
set_pv_thread .start ()
377
- g .waitfor_block (
378
- block = self .block_name , lowlimit = low_limit , maxwait = self .max_wait
379
- )
368
+ g .waitfor_block (block = self .block_name , lowlimit = low_limit , maxwait = self .max_wait )
380
369
381
370
assert_that (
382
371
set_pv_thread .is_alive (),
@@ -395,9 +384,7 @@ def test_GIVEN_waiting_for_value_above_low_limit_on_block_WHEN_block_below_limit
395
384
args = (self .wait_before , self .wait_after , self .pv_name , wrong_value ),
396
385
)
397
386
set_pv_thread .start ()
398
- g .waitfor_block (
399
- block = self .block_name , lowlimit = low_limit , maxwait = self .max_wait
400
- )
387
+ g .waitfor_block (block = self .block_name , lowlimit = low_limit , maxwait = self .max_wait )
401
388
402
389
assert_that (
403
390
set_pv_thread .is_alive (),
@@ -417,9 +404,7 @@ def test_GIVEN_waiting_for_value_below_high_limit_on_block_WHEN_block_reaches_li
417
404
args = (self .wait_before , self .wait_after , self .pv_name , high_limit ),
418
405
)
419
406
set_pv_thread .start ()
420
- g .waitfor_block (
421
- block = self .block_name , highlimit = high_limit , maxwait = self .max_wait
422
- )
407
+ g .waitfor_block (block = self .block_name , highlimit = high_limit , maxwait = self .max_wait )
423
408
424
409
assert_that (
425
410
set_pv_thread .is_alive (),
@@ -437,9 +422,7 @@ def test_GIVEN_waiting_for_value_above_low_limit_on_block_WHEN_block_reaches_lim
437
422
args = (self .wait_before , self .wait_after , self .pv_name , low_limit ),
438
423
)
439
424
set_pv_thread .start ()
440
- g .waitfor_block (
441
- block = self .block_name , lowlimit = low_limit , maxwait = self .max_wait
442
- )
425
+ g .waitfor_block (block = self .block_name , lowlimit = low_limit , maxwait = self .max_wait )
443
426
444
427
assert_that (
445
428
set_pv_thread .is_alive (),
@@ -606,9 +589,7 @@ def test_GIVEN_invalid_inst_script_from_settings_area_WHEN_calling_script_checke
606
589
607
590
script_lines_1 = "def sample_changer_scloop(a: int, b: str):\n \t pass\n "
608
591
609
- script_lines_2 = [
610
- "from inst import temp_file\n " "temp_file.sample_changer_scloop('a',2)\n "
611
- ]
592
+ script_lines_2 = ["from inst import temp_file\n " "temp_file.sample_changer_scloop('a',2)\n " ]
612
593
613
594
with open (os .path .join (path_to_inst , temp_file_name ), "w" ) as temp_file :
614
595
temp_file .write (script_lines_1 )
0 commit comments