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

[FIX] Tests include testgres by right way through import#241

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
[FIX] Tests include testgres by right way through import
When we do not have root __init__.py tests must to import testgres through"import testgres"not through"from <relative_path> import testgres"
  • Loading branch information
@dmitry-lipetsk
dmitry-lipetsk committedApr 25, 2025
commit0a232155c6e80d54a4b58ab2b64fdc244adc6def
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@
import shutil
import pytest

from ......import testgres
import testgres
from ...pg_probackup2.app import ProbackupApp
from ...pg_probackup2.init_helpers import Init, init_params
from ..storage.fs_backup import FSTestBackupDir
Expand Down
16 changes: 8 additions & 8 deletionstests/helpers/global_data.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
from...testgres.operations.os_ops import OsOperations
from...testgres.operations.os_ops import ConnectionParams
from...testgres.operations.local_ops import LocalOperations
from...testgres.operations.remote_ops import RemoteOperations

from...testgres.node import PortManager
from...testgres.node import PortManager__ThisHost
from...testgres.node import PortManager__Generic
from testgres.operations.os_ops import OsOperations
from testgres.operations.os_ops import ConnectionParams
from testgres.operations.local_ops import LocalOperations
from testgres.operations.remote_ops import RemoteOperations

from testgres.node import PortManager
from testgres.node import PortManager__ThisHost
from testgres.node import PortManager__Generic

import os

Expand Down
10 changes: 5 additions & 5 deletionstests/test_config.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
from..testgres import TestgresConfig
from..testgres import configure_testgres
from..testgres import scoped_config
from..testgres import pop_config
from testgres import TestgresConfig
from testgres import configure_testgres
from testgres import scoped_config
from testgres import pop_config

from ..import testgres
import testgres

import pytest

Expand Down
4 changes: 2 additions & 2 deletionstests/test_os_ops_common.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,8 +14,8 @@
import threading
import typing

from..testgres import InvalidOperationException
from..testgres import ExecUtilException
from testgres import InvalidOperationException
from testgres import ExecUtilException


class TestOsOpsCommon:
Expand Down
2 changes: 1 addition & 1 deletiontests/test_os_ops_remote.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@
from .helpers.global_data import OsOpsDescrs
from .helpers.global_data import OsOperations

from..testgres import ExecUtilException
from testgres import ExecUtilException

import os
import pytest
Expand Down
40 changes: 20 additions & 20 deletionstests/test_testgres_common.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,29 +3,29 @@
from .helpers.global_data import OsOperations
from .helpers.global_data import PortManager

from..testgres.node import PgVer
from..testgres.node import PostgresNode
from..testgres.utils import get_pg_version2
from..testgres.utils import file_tail
from..testgres.utils import get_bin_path2
from..testgres import ProcessType
from..testgres import NodeStatus
from..testgres import IsolationLevel
from testgres.node import PgVer
from testgres.node import PostgresNode
from testgres.utils import get_pg_version2
from testgres.utils import file_tail
from testgres.utils import get_bin_path2
from testgres import ProcessType
from testgres import NodeStatus
from testgres import IsolationLevel

# 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
from..testgres import ExecUtilException
from..testgres import TimeoutException
from..testgres import InvalidOperationException
from..testgres import BackupException
from..testgres import ProgrammingError
from..testgres import scoped_config
from..testgres import First, Any
from testgres import TestgresException as testgres_TestgresException

from testgres import InitNodeException
from testgres import StartNodeException
from testgres import QueryException
from testgres import ExecUtilException
from testgres import TimeoutException
from testgres import InvalidOperationException
from testgres import BackupException
from testgres import ProgrammingError
from testgres import scoped_config
from testgres import First, Any

from contextlib import contextmanager

Expand Down
24 changes: 12 additions & 12 deletionstests/test_testgres_local.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,21 +7,21 @@
import platform
import logging

from ..import testgres
import testgres

from..testgres import StartNodeException
from..testgres import ExecUtilException
from..testgres import NodeApp
from..testgres import scoped_config
from..testgres import get_new_node
from..testgres import get_bin_path
from..testgres import get_pg_config
from..testgres import get_pg_version
from testgres import StartNodeException
from testgres import ExecUtilException
from testgres import NodeApp
from testgres import scoped_config
from testgres import get_new_node
from testgres import get_bin_path
from testgres import get_pg_config
from testgres import get_pg_version

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


def pg_version_ge(version):
Expand Down
14 changes: 7 additions & 7 deletionstests/test_testgres_remote.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,16 +7,16 @@
from .helpers.global_data import PostgresNodeService
from .helpers.global_data import PostgresNodeServices

from ..import testgres
import testgres

from..testgres.exceptions import InitNodeException
from..testgres.exceptions import ExecUtilException
from testgres.exceptions import InitNodeException
from testgres.exceptions import ExecUtilException

from..testgres.config import scoped_config
from..testgres.config import testgres_config
from testgres.config import scoped_config
from testgres.config import testgres_config

from..testgres import get_bin_path
from..testgres import get_pg_config
from testgres import get_bin_path
from testgres import get_pg_config

# NOTE: those are ugly imports

Expand Down
6 changes: 3 additions & 3 deletionstests/test_utils.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,9 +2,9 @@
from .helpers.global_data import OsOpsDescrs
from .helpers.global_data import OsOperations

from..testgres.utils import parse_pg_version
from..testgres.utils import get_pg_config2
from..testgres import scoped_config
from testgres.utils import parse_pg_version
from testgres.utils import get_pg_config2
from testgres import scoped_config

import pytest
import typing
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp