@@ -240,13 +240,13 @@ def test_set_host_port(self):
240240 assert _can_set_host_port (ci , "host" , 4444 ), "Expected no errors"
241241 assert _can_set_combined_host_port (ci , "host:4444" ), "Expected no errors"
242242 assert _can_set_combined_host_port (ci , "host@4444" ), "Expected no errors"
243- assert _can_set_host_port (ci , "" , "" ) == False , "Expected errors"
244- assert _can_set_host_port (ci , "host" , "" ) == False , "Expected errors"
245- assert _can_set_host_port (ci , "host" , "host" ) == False , "Expected errors"
246- assert _can_set_combined_host_port (ci , "host:host" ) == False , "Expected errors"
247- assert _can_set_combined_host_port (ci , "3141:host" ) == False , "Expected errors"
248- assert _can_set_combined_host_port (ci , "3141@host" ) == False , "Expected errors"
249- assert _can_set_combined_host_port (ci , "3141@" ) == False , "Expected errors"
243+ assert not _can_set_host_port (ci , "" , "" ), "Expected errors"
244+ assert not _can_set_host_port (ci , "host" , "" ), "Expected errors"
245+ assert not _can_set_host_port (ci , "host" , "host" ), "Expected errors"
246+ assert not _can_set_combined_host_port (ci , "host:host" ), "Expected errors"
247+ assert not _can_set_combined_host_port (ci , "3141:host" ), "Expected errors"
248+ assert not _can_set_combined_host_port (ci , "3141@host" ), "Expected errors"
249+ assert not _can_set_combined_host_port (ci , "3141@" ), "Expected errors"
250250
251251 assert _can_construct_client_with_host_port (
252252 "host" , "3141"
@@ -255,18 +255,16 @@ def test_set_host_port(self):
255255 assert _can_construct_client_with_combined_host_port (
256256 "host:4444"
257257 ), "Expected no errors"
258- assert _can_construct_client_with_host_port ("" , "" ) == False , "Expected errors"
259- assert (
260- _can_construct_client_with_host_port ("host" , "" ) == False
258+ assert not _can_construct_client_with_host_port ("" , "" ), "Expected errors"
259+ assert not _can_construct_client_with_host_port ("host" , "" ), "Expected errors"
260+ assert not _can_construct_client_with_host_port (
261+ "host" , "host"
261262 ), "Expected errors"
262- assert (
263- _can_construct_client_with_host_port ( "host" , " host") == False
263+ assert not _can_construct_client_with_combined_host_port (
264+ "host: host"
264265 ), "Expected errors"
265- assert (
266- _can_construct_client_with_combined_host_port ("host:host" ) == False
267- ), "Expected errors"
268- assert (
269- _can_construct_client_with_combined_host_port ("3141:host" ) == False
266+ assert not _can_construct_client_with_combined_host_port (
267+ "3141:host"
270268 ), "Expected errors"
271269
272270
@@ -480,8 +478,8 @@ def test_client_checkpt(self):
480478 assert os .path .exists (
481479 Test .checkpt_file_path (port )
482480 ), "Expected check pt file to exist after ci.checkpt()"
483- assert (
484- os . path . exists ( Test .backup_checkpt_file_path (port )) == False
481+ assert not os . path . exists (
482+ Test .backup_checkpt_file_path (port )
485483 ), "Expected back up check pt file to *NOT* exist"
486484
487485 self .ci .checkpt () # second check pt should cause backup check pt to be written
@@ -1927,9 +1925,9 @@ def test_client_alter_change(self):
19271925 sync_local (self .ci )
19281926 task_t1 = self .ci .get_defs ().find_abs_node (t1 )
19291927 event = task_t1 .find_event ("event" )
1930- assert (
1931- event .value () == True
1932- ), "Expected alter of event to be set but found " + str ( event . value ())
1928+ assert event . value (), "Expected alter of event to be set but found " + str (
1929+ event .value ()
1930+ )
19331931 res = self .ci .query ("event" , task_t1 .get_abs_node_path (), "event" )
19341932 assert res == "set" , "Expected alter of event to be 'set' but found " + res
19351933
@@ -2129,12 +2127,10 @@ def test_client_force(self):
21292127 for event in task .events :
21302128 event_fnd = True
21312129 if ev_state == "set" :
2132- assert event .value () == True , " Expected event value to be set"
2130+ assert event .value (), " Expected event value to be set"
21332131 else :
2134- assert (
2135- event .value () == False
2136- ), " Expected event value to be clear"
2137- assert event_fnd == True , " Expected event to be found"
2132+ assert not event .value (), " Expected event value to be clear"
2133+ assert event_fnd , " Expected event to be found"
21382134
21392135 event_path_list = [
21402136 "/test_client_force/f1/t1:event" ,
@@ -2150,12 +2146,10 @@ def test_client_force(self):
21502146 for event in task .events :
21512147 event_fnd = True
21522148 if ev_state == "set" :
2153- assert event .value () == True , " Expected event value to be set"
2149+ assert event .value (), " Expected event value to be set"
21542150 else :
2155- assert (
2156- event .value () == False
2157- ), " Expected event value to be clear"
2158- assert event_fnd == True , " Expected event to be found"
2151+ assert not event .value (), " Expected event value to be clear"
2152+ assert event_fnd , " Expected event to be found"
21592153
21602154 @pytest .mark .parametrize ("on_disk" , [False , True ], ids = ["in_memory" , "on_disk" ])
21612155 def test_client_replace (self , on_disk ):
@@ -2405,7 +2399,7 @@ def test_client_resume(self):
24052399 self .ci .resume ("/test_client_resume" )
24062400 sync_local (self .ci )
24072401 suite = self .ci .get_defs ().find_suite ("test_client_resume" )
2408- assert suite .is_suspended () == False , "Expected to find suite resumed"
2402+ assert not suite .is_suspended (), "Expected to find suite resumed"
24092403
24102404 def test_client_resume_multiple_paths (self ):
24112405 print_test (self .ci , "test_client_resume_multiple_paths" )
@@ -2443,8 +2437,8 @@ def test_client_resume_multiple_paths(self):
24432437 task_t2 = self .ci .get_defs ().find_abs_node (
24442438 "/test_client_resume_multiple_paths/f1/t2"
24452439 )
2446- assert task_t1 .is_suspended () == False , "Expected to find task t1 to be resumed"
2447- assert task_t2 .is_suspended () == False , "Expected to find task t2 to be resumed"
2440+ assert not task_t1 .is_suspended (), "Expected to find task t1 to be resumed"
2441+ assert not task_t2 .is_suspended (), "Expected to find task t2 to be resumed"
24482442
24492443 def test_client_delete_node (self ):
24502444 print_test (self .ci , "test_client_delete_node" )
0 commit comments