@@ -475,11 +475,11 @@ def test_synchronous_replication(self):
475
475
476
476
# check formatting
477
477
assert (
478
- '1 ("{}", "{}")' .format (standby1 .name , standby2 .name ) ==
479
- str ( First ( 1 , ( standby1 , standby2 ))) ) # yapf: disable
478
+ '1 ("{}", "{}")' .format (standby1 .name , standby2 .name ) == str ( First ( 1 , ( standby1 , standby2 )))
479
+ ) # yapf: disable
480
480
assert (
481
- 'ANY 1 ("{}", "{}")' .format (standby1 .name , standby2 .name ) ==
482
- str ( Any ( 1 , ( standby1 , standby2 ))) ) # yapf: disable
481
+ 'ANY 1 ("{}", "{}")' .format (standby1 .name , standby2 .name ) == str ( Any ( 1 , ( standby1 , standby2 )))
482
+ ) # yapf: disable
483
483
484
484
# set synchronous_standby_names
485
485
master .set_synchronous_standbys (First (2 , [standby1 , standby2 ]))
@@ -592,7 +592,7 @@ def test_logical_catchup(self):
592
592
node1 .execute ('insert into test values ({0}, {0})' .format (i ))
593
593
sub .catchup ()
594
594
res = node2 .execute ('select * from test' )
595
- assert (res == [(i ,i , )])
595
+ assert (res == [(i , i , )])
596
596
node1 .execute ('delete from test' )
597
597
598
598
# @unittest.skipIf(pg_version_ge('10'), 'requires <10')
@@ -1030,7 +1030,7 @@ def test_child_process_dies(self):
1030
1030
cmd = ["timeout" , "60" ] if os .name == 'nt' else ["sleep" , "60" ]
1031
1031
1032
1032
with subprocess .Popen (cmd , shell = True ) as process : # shell=True might be needed on Windows
1033
- assert (process .poll () == None )
1033
+ assert (process .poll () is None )
1034
1034
# collect list of processes currently running
1035
1035
children = psutil .Process (os .getpid ()).children ()
1036
1036
# kill a process, so received children dictionary becomes invalid
@@ -1066,12 +1066,12 @@ def test_the_same_port(self):
1066
1066
with get_new_node () as node :
1067
1067
node .init ().start ()
1068
1068
assert (node ._should_free_port )
1069
- assert (type (node .port ) == int )
1069
+ assert (type (node .port ) == int ) # noqa: E721
1070
1070
node_port_copy = node .port
1071
1071
assert (rm_carriage_returns (node .safe_psql ("SELECT 1;" )) == b'1\n ' )
1072
1072
1073
1073
with get_new_node (port = node .port ) as node2 :
1074
- assert (type (node2 .port ) == int )
1074
+ assert (type (node2 .port ) == int ) # noqa: E721
1075
1075
assert (node2 .port == node .port )
1076
1076
assert not (node2 ._should_free_port )
1077
1077
@@ -1317,6 +1317,7 @@ def test_set_auto_conf(self):
1317
1317
1318
1318
for x in testData :
1319
1319
assert x [0 ] + " = " + x [2 ] in content
1320
+
1320
1321
@staticmethod
1321
1322
def helper__skip_test_if_util_not_exist (name : str ):
1322
1323
assert type (name ) == str # noqa: E721
@@ -1340,4 +1341,3 @@ def helper__skip_test_if_pg_version_is_ge(version: str):
1340
1341
assert type (version ) == str # noqa: E721
1341
1342
if pg_version_ge (version ):
1342
1343
pytest .skip ('requires <{0}' .format (version ))
1343
-
0 commit comments