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

Test refactoring#236

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
Show file tree
Hide file tree
Changes from1 commit
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
NextNext commit
TestUtils is added
  • Loading branch information
@dmitry-lipetsk
dmitry-lipetsk committedApr 6, 2025
commitcd0635e917cf17ea0b10f9be241ad1529028c380
12 changes: 1 addition & 11 deletionstests/test_testgres_local.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,7 +30,7 @@

# NOTE: those are ugly imports
from ..testgres import bound_ports
from ..testgres.utils import PgVer, parse_pg_version
from ..testgres.utils import PgVer
from ..testgres.node import ProcessProxy


Expand DownExpand Up@@ -234,16 +234,6 @@ def test_upgrade_node(self):
node_new.start()
assert (b'Upgrade Complete' in res)

def test_parse_pg_version(self):
# Linux Mint
assert parse_pg_version("postgres (PostgreSQL) 15.5 (Ubuntu 15.5-1.pgdg22.04+1)") == "15.5"
# Linux Ubuntu
assert parse_pg_version("postgres (PostgreSQL) 12.17") == "12.17"
# Windows
assert parse_pg_version("postgres (PostgreSQL) 11.4") == "11.4"
# Macos
assert parse_pg_version("postgres (PostgreSQL) 14.9 (Homebrew)") == "14.9"

class tagPortManagerProxy:
sm_prev_testgres_reserve_port = None
sm_prev_testgres_release_port = None
Expand Down
13 changes: 13 additions & 0 deletionstests/test_utils.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
from ..testgres.utils import parse_pg_version


class TestUtils:
def test_parse_pg_version(self):
# Linux Mint
assert parse_pg_version("postgres (PostgreSQL) 15.5 (Ubuntu 15.5-1.pgdg22.04+1)") == "15.5"
# Linux Ubuntu
assert parse_pg_version("postgres (PostgreSQL) 12.17") == "12.17"
# Windows
assert parse_pg_version("postgres (PostgreSQL) 11.4") == "11.4"
# Macos
assert parse_pg_version("postgres (PostgreSQL) 14.9 (Homebrew)") == "14.9"

[8]ページ先頭

©2009-2025 Movatter.jp