Fixtup
Test your python application beyond your code !
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.
- it starts the services needed to run your test
- it mount the longest fixtures only once whether you play a test or 100
- it cleans files and data between each test
- it runs on a developer's workstation without configuration
- it can be debugged step by step in your favorite IDE
Benefits
- You can get up and running with Fixtup in minutes, even on legacy project, no matter what your test framework is.
- You will stop wasting your time on boilerplate code
- Fixtup provides an easy way to run tests in debug in your favorite IDE like pycharm and vscode.
- Fixtup is cross-platform which makes it easy to use it on Linux, Mac and Windows.
Getting started
write clear, robust and easy-to-execute system integration tests in 5 minutes.
$ poetry init
$ poety add --dev fixtup
$ poetry run fixtup init
$ poetry run fixtup new
Choose a fixture identifier : thumbnail_context
Mount environment variables on this fixture (y/n) [n]
Mount docker container on this fixture (y/n) [n]
We will use this fixture to mount a directory with existing picture file.png and test
our thumbnail function is working well.
def test_thumbnail_should_generate_thumbnail(self):
# Magic happens with the instruction fixtup.up
with fixtup.up('thumbnail_context') as f:
# Given
wd = os.getcwd()
original_file = os.directory.join(wd, 'file.png')
expected_thumbnail_file = os.directory.join(wd, 'file_t.png')
# Then
thumbnail(original_file, expected_thumbnail_file)
# Then
self.assertTrue(os.directory.isfile(expected_thumbnail_file)
Fixtup mount the fixture thumbnail_context in temporary directory. At the end of the test, it clean up everything for you
Want more ? Fixtup even mount your containers, take a try.
The complete example is available in the repo
Installation
Using pip
pip install fixtup
Using Poetry (recommended for development)
poetry add --group dev fixtup
Development Setup
This project uses Poetry for dependency management and packaging.
Prerequisites
- Python 3.10 or higher
- Poetry
Setup
# Clone the repository
git clone https://github.com/FabienArcellier/fixtup.git
cd fixtup
# Install dependencies
poetry install
# Activate the virtual environment
poetry shell
Running Tests
# Run all tests
poetry run alfred tests
# Run specific test suites
poetry run alfred tests:units
poetry run alfred tests:integrations
poetry run alfred tests:acceptances
Linting
poetry run alfred lint
Building Documentation
poetry run alfred docs:build
poetry run alfred docs:display
Contributing
Metadata
Release files for fixtup 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fixtup-0.2.1.tar.gz | 26.8 kB | Without provenance | Details for fixtup-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fixtup-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for fixtup-0.2.1-py3-none-any.whl |
Total release size: 72.6 kB
Release files / fixtup-0.2.1.tar.gz
| Download URL | fixtup-0.2.1.tar.gz |
|---|---|
| Size | 26.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e5bc4317ee87046036fd3b0f2fbe656beb4905bf9f56e22192b94a48535e0fdf
|
|
BLAKE2b-256 checksum How to use checksums |
50e75ff3596bdde51a2c8ae236745b02db5a63245eaaa1aab6428d15d3200f28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.12.12 Linux/6.14.0-1017-azure
|
Release files / fixtup-0.2.1-py3-none-any.whl
| Download URL | fixtup-0.2.1-py3-none-any.whl |
|---|---|
| Size | 45.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5834d6a80c89559b49d1d3e444833aaa62b3aac89079de1618b750f81b692d8b
|
|
BLAKE2b-256 checksum How to use checksums |
eb78ae0af65096ecae70ea58a72c7273b150de032fd7c5cbb2d8e388709803fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.12.12 Linux/6.14.0-1017-azure
|
Security for fixtup 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.