@@ -402,12 +402,12 @@ def test_transactions(self):
402402con .begin ()
403403con .execute ('insert into test values (2)' )
404404res = con .execute ('select * from test order by val asc' )
405- self . assertListEqual (res , [(1 ,), (2 ,)])
405+ assert (res == [(1 ,), (2 ,)])
406406con .rollback ()
407407
408408con .begin ()
409409res = con .execute ('select * from test' )
410- self . assertListEqual (res , [(1 ,)])
410+ assert (res == [(1 ,)])
411411con .rollback ()
412412
413413con .begin ()
@@ -445,7 +445,7 @@ def test_backup_simple(self):
445445with master .backup (xlog_method = 'stream' )as backup :
446446with backup .spawn_primary ().start ()as slave :
447447res = slave .execute ('select * from test order by i asc' )
448- self . assertListEqual (res , [(1 ,), (2 ,), (3 ,), (4 ,)])
448+ assert (res == [(1 ,), (2 ,), (3 ,), (4 ,)])
449449
450450def test_backup_multiple (self ):
451451with get_remote_node (conn_params = conn_params )as node :
@@ -501,14 +501,14 @@ def test_replicate(self):
501501
502502with node .replicate ().start ()as replica :
503503res = replica .execute ('select 1' )
504- self . assertListEqual (res , [(1 ,)])
504+ assert (res == [(1 ,)])
505505
506506node .execute ('create table test (val int)' ,commit = True )
507507
508508replica .catchup ()
509509
510510res = node .execute ('select * from test' )
511- self . assertListEqual (res , [])
511+ assert (res == [])
512512
513513# @unittest.skipUnless(pg_version_ge('9.6'), 'requires 9.6+')
514514def test_synchronous_replication (self ):
@@ -575,7 +575,7 @@ def test_logical_replication(self):
575575# wait until changes apply on subscriber and check them
576576sub .catchup ()
577577res = node2 .execute ('select * from test' )
578- self . assertListEqual (res , [(1 ,1 ), (2 ,2 )])
578+ assert (res == [(1 ,1 ), (2 ,2 )])
579579
580580# disable and put some new data
581581sub .disable ()
@@ -585,7 +585,7 @@ def test_logical_replication(self):
585585sub .enable ()
586586sub .catchup ()
587587res = node2 .execute ('select * from test' )
588- self . assertListEqual (res , [(1 ,1 ), (2 ,2 ), (3 ,3 )])
588+ assert (res == [(1 ,1 ), (2 ,2 ), (3 ,3 )])
589589
590590# Add new tables. Since we added "all tables" to publication
591591# (default behaviour of publish() method) we don't need
@@ -599,7 +599,7 @@ def test_logical_replication(self):
599599node1 .safe_psql ('insert into test2 values (\' a\' ), (\' b\' )' )
600600sub .catchup ()
601601res = node2 .execute ('select * from test2' )
602- self . assertListEqual (res , [('a' ,), ('b' ,)])
602+ assert (res == [('a' ,), ('b' ,)])
603603
604604# drop subscription
605605sub .drop ()
@@ -613,7 +613,7 @@ def test_logical_replication(self):
613613node1 .safe_psql ('insert into test values (4, 4)' )
614614sub .catchup ()
615615res = node2 .execute ('select * from test' )
616- self . assertListEqual (res , [(1 ,1 ), (2 ,2 ), (3 ,3 ), (4 ,4 )])
616+ assert (res == [(1 ,1 ), (2 ,2 ), (3 ,3 ), (4 ,4 )])
617617
618618# explicitly add table
619619with pytest .raises (expected_exception = ValueError ):
@@ -622,7 +622,7 @@ def test_logical_replication(self):
622622node1 .safe_psql ('insert into test2 values (\' c\' )' )
623623sub .catchup ()
624624res = node2 .execute ('select * from test2' )
625- self . assertListEqual (res , [('a' ,), ('b' ,)])
625+ assert (res == [('a' ,), ('b' ,)])
626626
627627# @unittest.skipUnless(pg_version_ge('10'), 'requires 10+')
628628def test_logical_catchup (self ):
@@ -646,10 +646,7 @@ def test_logical_catchup(self):
646646node1 .execute ('insert into test values ({0}, {0})' .format (i ))
647647sub .catchup ()
648648res = node2 .execute ('select * from test' )
649- self .assertListEqual (res , [(
650- i ,
651- i ,
652- )])
649+ assert (res == [(i ,i ,)])
653650node1 .execute ('delete from test' )
654651
655652# @unittest.skipIf(pg_version_ge('10'), 'requires <10')
@@ -710,7 +707,7 @@ def test_dump(self):
710707# restore dump
711708node3 .restore (filename = dump )
712709res = node3 .execute (query_select )
713- self . assertListEqual (res , [(1 ,), (2 ,)])
710+ assert (res == [(1 ,), (2 ,)])
714711
715712def test_users (self ):
716713with get_remote_node (conn_params = conn_params ).init ().start ()as node :