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

Add version property to PostgresNode#49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
funbringer merged 3 commits intopostgrespro:masterfromildus:version_property
Jun 26, 2018
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletionstestgres/node.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -278,6 +278,16 @@ def utils_log_file(self):
def pg_log_file(self):
return os.path.join(self.logs_dir, PG_LOG_FILE)

@property
def version(self):
"""
Return PostgreSQL version for this node.

Returns:
Instance of :class:`distutils.version.LooseVersion`.
"""
return self._pg_version

def _try_shutdown(self, max_attempts):
attempts = 0

Expand Down
7 changes: 7 additions & 0 deletionstests/test_simple.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@
import tempfile
import testgres
import time
import six
import unittest

import logging.config
Expand DownExpand Up@@ -857,6 +858,12 @@ def test_version_management(self):
self.assertTrue(b > c)
self.assertTrue(a > c)

version = get_pg_version()
with get_new_node() as node:
self.assertTrue(isinstance(version, six.string_types))
self.assertTrue(isinstance(node.version, PgVer))
self.assertEqual(node.version, str(version))

def test_child_pids(self):
master_processes = [
ProcessType.AutovacuumLauncher,
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp