Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ jobs:
DEST_SANIC: examples/sanic
PYTHONDEVMODE: 1
PYTEST_ARGS: "-n auto --cov=tortoise --cov-append --cov-branch --tb=native -q"
- name: Test poetry add
if: matrix.python-version == 'py3.10'
run: |
uv run --no-sync pytest $PYTEST_ARGS tests/test_version.py::test_added_by_poetry_v2
env:
TORTOISE_TEST_POETRY_ADD: 1
PYTHONDEVMODE: 1
PYTEST_ARGS: "-n auto --cov=tortoise --cov-append --cov-branch --tb=native -q"
- name: Test No typing-extensions
if: matrix.python-version == 'py3.11'
run: |
Expand Down
7 changes: 0 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ repository = "https://github.com/tortoise/tortoise-orm.git"
[project.scripts]
tortoise = "tortoise.cli:main"

[tool.poetry]
requires-poetry = ">=2.0"
packages = [
{ include = "tortoise" }
]
version = "0.0.0"

[dependency-groups]
dev = [
# Linter tools
Expand Down
6 changes: 6 additions & 0 deletions tests/test_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import importlib.metadata as importlib_metadata
import os
import re
import shlex
import shutil
Expand All @@ -7,6 +8,7 @@
from pathlib import Path

from tortoise import __version__
from tortoise.contrib import test

if sys.version_info >= (3, 11):
from contextlib import chdir
Expand Down Expand Up @@ -45,6 +47,10 @@ def _capture_output(cmd: str) -> str:
return _run_shell(cmd, text=True, capture_output=True, encoding="utf-8").stdout


@test.skipIf(
os.getenv("TORTOISE_TEST_POETRY_ADD", "").lower() not in ("1", "true", "yes", "on"),
"Env 'TORTOISE_TEST_POETRY_ADD' is not true",
)
def test_added_by_poetry_v2(tmp_path: Path):
tortoise_orm = Path(__file__).parent.resolve().parent
py = "{}.{}".format(*sys.version_info)
Expand Down