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

Warnings with pytest are fixed#223

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 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
2 changes: 1 addition & 1 deletionpytest.ini
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
[pytest]
testpaths =["./tests", "./testgres/plugins/pg_probackup2/pg_probackup2/tests"]
testpaths = teststestgres/plugins/pg_probackup2/pg_probackup2/tests
addopts = --strict-markers
markers =
#log_file = logs/pytest.log
Expand Down
14 changes: 9 additions & 5 deletionstests/test_testgres_common.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,7 +10,11 @@
from ..testgres import ProcessType
from ..testgres import NodeStatus
from ..testgres import IsolationLevel
from ..testgres import TestgresException

# New name prevents to collect test-functions in TestgresException and fixes
# the problem with pytest warning.
from ..testgres import TestgresException as testgres_TestgresException

from ..testgres import InitNodeException
from ..testgres import StartNodeException
from ..testgres import QueryException
Expand DownExpand Up@@ -336,7 +340,7 @@ def LOCAL__check_auxiliary_pids__multiple_attempts(
with __class__.helper__get_node(os_ops).init().start() as master:

# master node doesn't have a source walsender!
with pytest.raises(expected_exception=TestgresException):
with pytest.raises(expected_exception=testgres_TestgresException):
master.source_walsender

with master.connect() as con:
Expand DownExpand Up@@ -366,7 +370,7 @@ def LOCAL__check_auxiliary_pids__multiple_attempts(
replica.stop()

# there should be no walsender after we've stopped replica
with pytest.raises(expected_exception=TestgresException):
with pytest.raises(expected_exception=testgres_TestgresException):
replica.source_walsender

def test_exceptions(self):
Expand DownExpand Up@@ -1013,7 +1017,7 @@ def test_replication_slots(self, os_ops: OsOperations):
replica.execute('select 1')

# cannot create new slot with the same name
with pytest.raises(expected_exception=TestgresException):
with pytest.raises(expected_exception=testgres_TestgresException):
node.replicate(slot='slot1')

def test_incorrect_catchup(self, os_ops: OsOperations):
Expand All@@ -1022,7 +1026,7 @@ def test_incorrect_catchup(self, os_ops: OsOperations):
node.init(allow_streaming=True).start()

# node has no master, can't catch up
with pytest.raises(expected_exception=TestgresException):
with pytest.raises(expected_exception=testgres_TestgresException):
node.catchup()

def test_promotion(self, os_ops: OsOperations):
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp