Skip to main content

integration testing on steroids

Project description

Fixtup

version ci MIT

You will love writing integration tests in python with Fixtup.

outline schematic from fixtup

Some of your tests need a database, a folder with data, dedicated environment variables, Fixtup provides all of this for you. Don't even bother to take care of the cleaning, it releases by itself the resources that it has provisioned.

Fixtup makes it easy to use external dependencies in your tests. It integrates to your favorite test framework like pytest, unitest or even BDD framework like robot framework or behave.

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 to create a database, that's all done in one line with Fixtup.
  • Fixtup provides an easy way to run tests in debug in your favorite IDE, pycharm and vscode.
  • Fixtup is cross-platform which makes it easy to use it on Linux, Mac and Windows.

Getting started

Take 10 minutes to get all the key to start with fixtup in Getting started.

pip install fixtup

Here is an example that shows how fixtup makes it easier to test a function that generate a thumbnail.

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)

The complete example is available in the repo

Contributing

More information into CONTRIBUTING.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fixtup-0.0.7.tar.gz (27.4 kB view details)

Uploaded Source

Built Distribution

fixtup-0.0.7-py3-none-any.whl (41.5 kB view details)

Uploaded Python 3

File details

Details for the file fixtup-0.0.7.tar.gz.

File metadata

  • Download URL: fixtup-0.0.7.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for fixtup-0.0.7.tar.gz
Algorithm Hash digest
SHA256 1087ac23d4501084e4b8e982cc10e26431c99b51d4f60cf608a60b714f87109c
MD5 dfe28687fc952727e05331719e9fcfb9
BLAKE2b-256 c71051a45dfffdb665caf80fb632e5e0672659c5dba9b75d032f258285d95253

See more details on using hashes here.

File details

Details for the file fixtup-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: fixtup-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 41.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for fixtup-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 38f60348c4e6ee5ab0ed296552d97c4df67d79d026c7ed1a0e218866b652c380
MD5 ac6449b3609d0d1a0cf670840f26836c
BLAKE2b-256 9d1e7189970b1f26919b817f61a342f7b05c301f36e5799932bf631ff4287193

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page