{"id":21925263,"url":"https://github.com/fabienarcellier/fixtup","last_synced_at":"2025-04-19T15:46:13.240Z","repository":{"id":38009260,"uuid":"461918265","full_name":"FabienArcellier/fixtup","owner":"FabienArcellier","description":"Test python application beyond the code boundaries !","archived":false,"fork":false,"pushed_at":"2023-08-15T07:13:09.000Z","size":1661,"stargazers_count":8,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T07:06:52.944Z","etag":null,"topics":["pytest","python","testing","unittest"],"latest_commit_sha":null,"homepage":"https://fixtup.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FabienArcellier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-21T15:22:34.000Z","updated_at":"2024-12-08T14:49:42.000Z","dependencies_parsed_at":"2023-01-31T08:30:22.639Z","dependency_job_id":null,"html_url":"https://github.com/FabienArcellier/fixtup","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabienArcellier%2Ffixtup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabienArcellier%2Ffixtup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabienArcellier%2Ffixtup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabienArcellier%2Ffixtup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FabienArcellier","download_url":"https://codeload.github.com/FabienArcellier/fixtup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249730296,"owners_count":21317271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pytest","python","testing","unittest"],"created_at":"2024-11-28T21:17:48.089Z","updated_at":"2025-04-19T15:46:13.213Z","avatar_url":"https://github.com/FabienArcellier.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fixtup\n\nTest your python application beyond your code !\n\n[![version](https://img.shields.io/pypi/v/fixtup.svg?label=version)](https://pypi.org/project/fixtup/) [![ci](https://github.com/FabienArcellier/fixtup/actions/workflows/ci.yml/badge.svg)](https://github.com/FabienArcellier/fixtup/actions/workflows/ci.yml) [![MIT](https://img.shields.io/badge/license-MIT-007EC7.svg)](LICENSE.md)\n\n![Fixtup manages disposable environments \u0026 data for your tests](https://raw.githubusercontent.com/FabienArcellier/fixtup/master/docs/source/_static/principle_simplified_diagram.png)\n\n**write clear, robust and easy-to-execute system integration tests** with your favorite test framwork like ``pytest``, ``unittest`` or event BDD framework as ``robot framework`` or ``behave``.\n\n* it starts the services needed to run your test\n* it mount the longest fixtures only once whether you play a test or 100\n* it cleans files and data between each test\n* it runs on a developer's workstation without configuration\n* it can be debugged step by step in your favorite IDE\n\n## Benefits\n\n* You can get up and running with Fixtup **in minutes**, even on legacy project, **no matter what your test framework is**.\n* You will **stop wasting your time on boilerplate code**\n* Fixtup provides an easy way to **run tests in debug in your favorite IDE like pycharm and vscode**.\n* Fixtup is cross-platform which makes it easy to use it on Linux, Mac and Windows.\n\n## Getting started\n\n**write clear, robust and easy-to-execute system integration tests** in 5 minutes.\n\n```bash\n$ poetry init\n$ poety add --dev fixtup\n```\n\n```bash\n$ poetry run fixtup init\n$ poetry run fixtup new\nChoose a fixture identifier : thumbnail_context\nMount environment variables on this fixture (y/n) [n]\nMount docker container on this fixture (y/n) [n]\n```\n\nWe will use this fixture to mount a directory with existing picture `file.png` and test\nour `thumbnail` function is working well.\n\n```python\ndef test_thumbnail_should_generate_thumbnail(self):\n\n    # Magic happens with the instruction fixtup.up\n    with fixtup.up('thumbnail_context') as f:\n        # Given\n        wd = os.getcwd()\n        original_file = os.directory.join(wd, 'file.png')\n        expected_thumbnail_file = os.directory.join(wd, 'file_t.png')\n\n        # Then\n        thumbnail(original_file, expected_thumbnail_file)\n\n        # Then\n        self.assertTrue(os.directory.isfile(expected_thumbnail_file)\n```\n\nFixtup mount the fixture `thumbnail_context` in temporary directory. At the end of the test, it clean up everything for you\nWant more ? [Fixtup even mount your containers, take a try](https://fixtup.readthedocs.io/en/latest/handbook.html#mount-a-postgresql-database-in-a-test).\n\n[The complete example is available in the repo](https://github.com/FabienArcellier/fixtup/tree/master/examples)\n\n## Contributing\n\n[More information into CONTRIBUTING.md](https://github.com/FabienArcellier/fixtup/blob/master/CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabienarcellier%2Ffixtup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabienarcellier%2Ffixtup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabienarcellier%2Ffixtup/lists"}