Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7707844

Browse files
committed
Add version property to PostgresNode:
1 parent80a3e55 commit7707844

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

‎testgres/node.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,16 @@ def utils_log_file(self):
278278
defpg_log_file(self):
279279
returnos.path.join(self.logs_dir,PG_LOG_FILE)
280280

281+
@property
282+
defversion(self):
283+
"""
284+
Return PostgreSQL version for this node.
285+
286+
Returns:
287+
Instance of :class:`distutils.version.LooseVersion`.
288+
"""
289+
returnself._pg_version
290+
281291
def_try_shutdown(self,max_attempts):
282292
attempts=0
283293

‎tests/test_simple.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,12 @@ def test_version_management(self):
857857
self.assertTrue(b>c)
858858
self.assertTrue(a>c)
859859

860+
version=get_pg_version()
861+
withget_new_node()asnode:
862+
self.assertTrue(isinstance(version,str))
863+
self.assertTrue(isinstance(node.version,PgVer))
864+
self.assertTrue(node.version==version)
865+
860866
deftest_child_pids(self):
861867
master_processes= [
862868
ProcessType.AutovacuumLauncher,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp