mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Add pytest-lazyfixture stubs (#5745)
This change will add stubs for pytest-lazyfixture. It is particual useful for projects which type their tests and use pytest-lazyfixture. The included functions and classes are the scope which can be considered documented by the module. Any other function is related to pytest hook implementations and are normally not called by an user. Please note, that if a user uses 'pytest.lazy_fixture' these stubs will not work. As recommneded in https://github.com/TvoroG/pytest-lazy-fixture/issues/51 the package needs to imported directly. Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
1
stubs/pytest-lazy-fixture/METADATA.toml
Normal file
1
stubs/pytest-lazy-fixture/METADATA.toml
Normal file
@@ -0,0 +1 @@
|
||||
version = "0.6"
|
||||
14
stubs/pytest-lazy-fixture/pytest_lazyfixture.pyi
Normal file
14
stubs/pytest-lazy-fixture/pytest_lazyfixture.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
from typing import Any, Iterable, overload
|
||||
|
||||
class LazyFixture:
|
||||
name: str
|
||||
def __init__(self, name: str) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
@overload
|
||||
def lazy_fixture(names: str) -> LazyFixture: ...
|
||||
@overload
|
||||
def lazy_fixture(names: Iterable[str]) -> list[LazyFixture] | Any: ...
|
||||
def is_lazy_fixture(val: Any) -> bool: ...
|
||||
def pytest_configure() -> None: ...
|
||||
def __getattr__(name: str) -> Any: ... # incomplete
|
||||
Reference in New Issue
Block a user