1
0
mirror of https://github.com/MousaZeidBaker/poetry-plugin-up.git synced 2025-10-05 21:32:40 +02:00
Files
poetry-plugin-up/tests/helpers.py
2025-01-09 08:39:28 +01:00

36 lines
810 B
Python

from typing import Any
import pytest
from poetry.console.application import Application
from poetry.poetry import Poetry
from poetry_plugin_up.command import UpCommand
from src.poetry_plugin_up.command import poetry_version_above_2
poetry_v1 = pytest.mark.skipif(
poetry_version_above_2(),
reason="Requires Poetry below 2.0.0.",
)
poetry_v2 = pytest.mark.skipif(
not poetry_version_above_2(),
reason="Requires Poetry 2.0.0 or up.",
)
class TestUpCommand(UpCommand):
def __init__(self, poetry: Poetry) -> None:
super().__init__()
self._poetry = poetry
__test__ = False
def line(self, data: Any):
print(data)
class TestApplication(Application):
def __init__(self, poetry: Poetry) -> None:
super().__init__()
self._poetry = poetry