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

Testgres is tested on python 3.7 now, too#280

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
1 change: 1 addition & 0 deletions.travis.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,6 +19,7 @@ notifications:
on_failure: always

env:
- TEST_PLATFORM=std2-all PYTHON_VERSION=3.7 PG_VERSION=17
- TEST_PLATFORM=std2-all PYTHON_VERSION=3.8.0 PG_VERSION=17
- TEST_PLATFORM=std2-all PYTHON_VERSION=3.8 PG_VERSION=17
- TEST_PLATFORM=std2-all PYTHON_VERSION=3.9 PG_VERSION=17
Expand Down
4 changes: 4 additions & 0 deletionsDockerfile--std2-all.tmpl
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,6 +20,10 @@ RUN apk add openssl openssl-dev
RUN apk add sqlite-dev
RUN apk add bzip2-dev

# --------------------------------------------- base3_with_python-3.7
FROM base2_with_python-3 as base3_with_python-3.7
ENV PYTHON_VERSION=3.7

# --------------------------------------------- base3_with_python-3.8.0
FROM base2_with_python-3 as base3_with_python-3.8.0
ENV PYTHON_VERSION=3.8.0
Expand Down
2 changes: 1 addition & 1 deletionREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@

# testgres

PostgreSQL testing utility. Python 3.8+ is supported.
PostgreSQL testing utility. Python 3.7.17+ is supported.


## Installation
Expand Down
26 changes: 18 additions & 8 deletionstests/conftest.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,10 +14,20 @@
import _pytest.unittest
import _pytest.logging

from packaging.version import Version

# /////////////////////////////////////////////////////////////////////////////

C_ROOT_DIR__RELATIVE = ".."

# /////////////////////////////////////////////////////////////////////////////
# T_PLUGGY_RESULT

if Version(pluggy.__version__) <= Version("1.2"):
T_PLUGGY_RESULT = pluggy._result._Result
else:
T_PLUGGY_RESULT = pluggy.Result

# /////////////////////////////////////////////////////////////////////////////
# TestConfigPropNames

Expand DownExpand Up@@ -344,15 +354,15 @@ def helper__build_test_id(item: pytest.Function) -> str:


def helper__makereport__setup(
item: pytest.Function, call: pytest.CallInfo, outcome:pluggy.Result
item: pytest.Function, call: pytest.CallInfo, outcome:T_PLUGGY_RESULT
):
assert item is not None
assert call is not None
assert outcome is not None
# it may be pytest.Function or _pytest.unittest.TestCaseFunction
assert isinstance(item, pytest.Function)
assert type(call) == pytest.CallInfo # noqa: E721
assert type(outcome) ==pluggy.Result # noqa: E721
assert type(outcome) ==T_PLUGGY_RESULT # noqa: E721

C_LINE1 = "******************************************************"

Expand DownExpand Up@@ -403,15 +413,15 @@ def helper__makereport__setup(

# ------------------------------------------------------------------------
def helper__makereport__call(
item: pytest.Function, call: pytest.CallInfo, outcome:pluggy.Result
item: pytest.Function, call: pytest.CallInfo, outcome:T_PLUGGY_RESULT
):
assert item is not None
assert call is not None
assert outcome is not None
# it may be pytest.Function or _pytest.unittest.TestCaseFunction
assert isinstance(item, pytest.Function)
assert type(call) == pytest.CallInfo # noqa: E721
assert type(outcome) ==pluggy.Result # noqa: E721
assert type(outcome) ==T_PLUGGY_RESULT # noqa: E721

# --------
item_error_msg_count1 = item.stash.get(g_error_msg_count_key, 0)
Expand DownExpand Up@@ -578,9 +588,9 @@ def pytest_runtest_makereport(item: pytest.Function, call: pytest.CallInfo):
assert isinstance(item, pytest.Function)
assert type(call) == pytest.CallInfo # noqa: E721

outcome: pluggy.Result = yield
outcome = yield
assert outcome is not None
assert type(outcome) ==pluggy.Result # noqa: E721
assert type(outcome) ==T_PLUGGY_RESULT # noqa: E721

assert type(call.when) == str # noqa: E721

Expand DownExpand Up@@ -738,10 +748,10 @@ def pytest_pyfunc_call(pyfuncitem: pytest.Function):
assert logWrapper._critical_counter == 0
assert logging.root.handle is logWrapper

r: pluggy.Result = yield
r = yield

assert r is not None
assert type(r) ==pluggy.Result # noqa: E721
assert type(r) ==T_PLUGGY_RESULT # noqa: E721

assert logWrapper._old_method is not None
assert type(logWrapper._err_counter) == int # noqa: E721
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp