8000 Using pytest [assertGreater] · postgrespro/testgres@eaaa276 · GitHub
[go: up one dir, main page]

Skip to content

Commit eaaa276

Browse files
Using pytest [assertGreater]
1 parent e8aad3d commit eaaa276

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/test_simple.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ def test_init_unique_system_id(self):
171171
id2 = node2.execute(query)[0]
172172

173173
# ids must increase
174-
self.assertGreater(id1, id0)
175-
self.assertGreater(id2, id1)
174+
assert (id1 > id0)
175+
assert (id2 > id1)
176176

177177
def test_node_exit(self):
178178
base_dir = None
@@ -1002,7 +1002,7 @@ def test_child_pids(self):
10021002
master.source_walsender
10031003

10041004
with master.connect() as con:
1005-
self.assertGreater(con.pid, 0)
1005+
assert (con.pid > 0)
10061006

10071007
with master.replicate().start() as replica:
10081008

tests/test_simple_remote.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ def test_init_unique_system_id(self):
230230
id2 = node2.execute(query)[0]
231231

232232
# ids must increase
233-
self.assertGreater(id1, id0)
234-
self.assertGreater(id2, id1)
233+
assert (id1 > id0)
234+
assert (id2 > id1)
235235

236236
def test_node_exit(self):
237237
with pytest.raises(expected_exception=QueryException):
@@ -1045,7 +1045,7 @@ def test_child_pids(self):
10451045
master.source_walsender
10461046

10471047
with master.connect() as con:
1048-
self.assertGreater(con.pid, 0)
1048+
assert (con.pid > 0)
10491049

10501050
with master.replicate().start() as replica:
10511051

0 commit comments

Comments
 (0)
0