mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 04:25:50 +08:00
[behave] Add package (incomplete) (#15505)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
"stubs/auth0-python",
|
||||
"stubs/Authlib",
|
||||
"stubs/aws-xray-sdk",
|
||||
"stubs/behave",
|
||||
"stubs/boltons",
|
||||
"stubs/braintree",
|
||||
"stubs/cffi",
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
version = "1.3.*"
|
||||
upstream_repository = "https://github.com/behave/behave"
|
||||
partial_stub = true
|
||||
|
||||
[tool.stubtest]
|
||||
ignore_missing_stub = true
|
||||
@@ -0,0 +1,13 @@
|
||||
from behave.fixture import fixture as fixture, use_fixture as use_fixture
|
||||
from behave.step_registry import (
|
||||
Given as Given,
|
||||
Step as Step,
|
||||
Then as Then,
|
||||
When as When,
|
||||
given as given,
|
||||
step as step,
|
||||
then as then,
|
||||
when as when,
|
||||
)
|
||||
|
||||
__all__ = ["given", "when", "then", "step", "Given", "When", "Then", "Step", "use_fixture", "fixture"]
|
||||
@@ -0,0 +1,15 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
from typing import Any, Concatenate, ParamSpec, TypeVar
|
||||
|
||||
from behave.runner import Context
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_F = TypeVar("_F", bound=Callable[..., Any])
|
||||
_P = ParamSpec("_P")
|
||||
|
||||
def use_fixture(
|
||||
fixture_func: Callable[Concatenate[Context, _P], _T], context: Context, *fixture_args: _P.args, **fixture_kwargs: _P.kwargs
|
||||
) -> _T: ...
|
||||
def fixture(func: _F | None = None, name: str | None = None, pattern: str | None = None) -> _F: ...
|
||||
def __getattr__(name: str) -> Incomplete: ...
|
||||
@@ -0,0 +1,38 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
from contextlib import AbstractContextManager
|
||||
from typing import ClassVar, ParamSpec
|
||||
|
||||
_P = ParamSpec("_P")
|
||||
|
||||
class Context:
|
||||
LAYER_NAMES: ClassVar[list[str]]
|
||||
FAIL_ON_CLEANUP_ERRORS: ClassVar[bool]
|
||||
|
||||
feature: Incomplete | None
|
||||
scenario: Incomplete
|
||||
tags: set[str]
|
||||
aborted: bool
|
||||
failed: bool
|
||||
table: Incomplete | None
|
||||
text: str | None
|
||||
config: Incomplete
|
||||
active_outline: Incomplete
|
||||
fail_on_cleanup_errors: bool
|
||||
|
||||
def __init__(self, runner) -> None: ...
|
||||
def __getattr__(self, name: str) -> Incomplete: ...
|
||||
def __setattr__(self, name: str, value) -> None: ...
|
||||
def __delattr__(self, name: str) -> None: ...
|
||||
def __contains__(self, name: str) -> bool: ...
|
||||
def abort(self, reason: str | None = None) -> None: ...
|
||||
def use_or_assign_param(self, name: str, value): ...
|
||||
def use_or_create_param(self, name: str, factory_func: Callable[_P, Incomplete], *args: _P.args, **kwargs: _P.kwargs): ...
|
||||
def use_with_user_mode(self) -> AbstractContextManager[None]: ...
|
||||
def execute_steps(self, steps_text: str) -> bool: ...
|
||||
def add_cleanup(self, cleanup_func: Callable[_P, Incomplete], *args: _P.args, **kwargs: _P.kwargs) -> None: ...
|
||||
@property
|
||||
def captured(self): ...
|
||||
def attach(self, mime_type: str, data: bytes) -> None: ...
|
||||
|
||||
def __getattr__(name: str) -> Incomplete: ...
|
||||
@@ -0,0 +1,20 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
from typing import Concatenate, TypeVar
|
||||
|
||||
from behave.runner import Context
|
||||
|
||||
_F = TypeVar("_F", bound=Callable[Concatenate[Context, ...], None])
|
||||
|
||||
def given(step_text: str, **kwargs) -> Callable[[_F], _F]: ...
|
||||
def when(step_text: str, **kwargs) -> Callable[[_F], _F]: ...
|
||||
def then(step_text: str, **kwargs) -> Callable[[_F], _F]: ...
|
||||
def step(step_text: str, **kwargs) -> Callable[[_F], _F]: ...
|
||||
|
||||
# Title-case aliases
|
||||
Given = given
|
||||
When = when
|
||||
Then = then
|
||||
Step = step
|
||||
|
||||
def __getattr__(name: str) -> Incomplete: ...
|
||||
Reference in New Issue
Block a user