pytypest


Namepytypest JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryType-safe and maintainable fixtures and parametrization for pytest.
upload_time2023-10-02 16:16:45
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords pytest tests testing framework fixtures
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pytypest

Type-safe and maintainable fixtures and parametrization for [pytest](https://github.com/pytest-dev/pytest).

Features:

+ 100% type safe.
+ Great IDE integration, go-to-definition always takes you in the right place.
+ Test parametrization that is readable even with many arguments.
+ Plug-and-play integration with pytest.
+ No vendor-lock, you can use only the features you need and don't touch the rest.
+ Fixtures can be cached, and you are in control of for how long.
+ Fixtures can accept arguments.

Check out [motivation](https://pytypest.orsinium.dev/motivation.html) if you want to know more about why this project was born.

## Installation

```bash
python3 -m pip install pytypest
```

## Usage

Fixtures are regular helper functions that `yield` their result and do teardown afterwards:

```python
from typing import Iterator
from pytypest import fixture

@fixture
def get_user(anonymous: bool) -> Iterator[User]:
    u = User(anonymous=anonymous)
    u.save()
    yield u
    u.delete()

def test_user() -> None:
    u = get_user(anonymous=False)
    assert u.anonymous is False
```

Compared to built-in pytest fixtures, these are explicit, type-safe, can accept arguments, support go-to-definition in IDE, and can be used as context managers. And like pytest fixtures, they are cached and can be scoped to the module or the whole session.

Read more in the **documentation**: [pytypest.orsinium.dev](https://pytypest.orsinium.dev/).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pytypest",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "pytest,tests,testing,framework,fixtures",
    "author": null,
    "author_email": "Gram <git@orsinium.dev>",
    "download_url": "https://files.pythonhosted.org/packages/65/11/4f309c036be5f764dc4cfd0cebcaa16c7a7f5950c0b78814bff63108b84c/pytypest-1.0.1.tar.gz",
    "platform": null,
    "description": "# pytypest\n\nType-safe and maintainable fixtures and parametrization for [pytest](https://github.com/pytest-dev/pytest).\n\nFeatures:\n\n+ 100% type safe.\n+ Great IDE integration, go-to-definition always takes you in the right place.\n+ Test parametrization that is readable even with many arguments.\n+ Plug-and-play integration with pytest.\n+ No vendor-lock, you can use only the features you need and don't touch the rest.\n+ Fixtures can be cached, and you are in control of for how long.\n+ Fixtures can accept arguments.\n\nCheck out [motivation](https://pytypest.orsinium.dev/motivation.html) if you want to know more about why this project was born.\n\n## Installation\n\n```bash\npython3 -m pip install pytypest\n```\n\n## Usage\n\nFixtures are regular helper functions that `yield` their result and do teardown afterwards:\n\n```python\nfrom typing import Iterator\nfrom pytypest import fixture\n\n@fixture\ndef get_user(anonymous: bool) -> Iterator[User]:\n    u = User(anonymous=anonymous)\n    u.save()\n    yield u\n    u.delete()\n\ndef test_user() -> None:\n    u = get_user(anonymous=False)\n    assert u.anonymous is False\n```\n\nCompared to built-in pytest fixtures, these are explicit, type-safe, can accept arguments, support go-to-definition in IDE, and can be used as context managers. And like pytest fixtures, they are cached and can be scoped to the module or the whole session.\n\nRead more in the **documentation**: [pytypest.orsinium.dev](https://pytypest.orsinium.dev/).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Type-safe and maintainable fixtures and parametrization for pytest.",
    "version": "1.0.1",
    "project_urls": {
        "Source": "https://github.com/orsinium-labs/pytypest"
    },
    "split_keywords": [
        "pytest",
        "tests",
        "testing",
        "framework",
        "fixtures"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c0fb845f41a62d4952d8713ce6e10a055f7cf799dca48a84999c1b9012406bde",
                "md5": "1a43526ed75baed11b6d6a335bb32795",
                "sha256": "c1688279605bc4458fa8154cd85ec8df5c242e036a42adf481a4bb93ba567b76"
            },
            "downloads": -1,
            "filename": "pytypest-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1a43526ed75baed11b6d6a335bb32795",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 16452,
            "upload_time": "2023-10-02T16:16:43",
            "upload_time_iso_8601": "2023-10-02T16:16:43.616136Z",
            "url": "https://files.pythonhosted.org/packages/c0/fb/845f41a62d4952d8713ce6e10a055f7cf799dca48a84999c1b9012406bde/pytypest-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "65114f309c036be5f764dc4cfd0cebcaa16c7a7f5950c0b78814bff63108b84c",
                "md5": "fba2c5039e7275fc1c62eb6d5112cad1",
                "sha256": "184653886cccfa2c9459554f2dbc9bdb7e76841338dd1e2092fa8ff21bf22991"
            },
            "downloads": -1,
            "filename": "pytypest-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "fba2c5039e7275fc1c62eb6d5112cad1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 23836,
            "upload_time": "2023-10-02T16:16:45",
            "upload_time_iso_8601": "2023-10-02T16:16:45.403991Z",
            "url": "https://files.pythonhosted.org/packages/65/11/4f309c036be5f764dc4cfd0cebcaa16c7a7f5950c0b78814bff63108b84c/pytypest-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-02 16:16:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "orsinium-labs",
    "github_project": "pytypest",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pytypest"
}
        
Elapsed time: 0.14034s