Skip to main content

Generates pytest fixtures that allow the use of type hinting

Project description


Writes pytest fixtures for FactoryBoy with type hinting. The hints allow for proper code completion in your tests when using PyCharm.


pytest-factoryboy-fixtures [comma seperated class names]

Add the generated code to your


>>> pytest-factoryboy-fixtures FirstClass,SecondClass

    def first_class() -> FirstClass:
        return FirstClassFactory()
    def first_class_factory() -> Union[Type[FirstClass], Type[FirstClassFactory]]:
        return FirstClassFactory
    def second_class() -> SecondClass:
        return SecondClassFactory()
    def second_class_factory() -> Union[Type[SecondClass], Type[SecondClassFactory]]:
        return SecondClassFactory

Project details

Release history Release notifications | RSS feed

This version


Download files

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

Files for pytest-factoryboy-fixtures, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size pytest-factoryboy-fixtures-0.1.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page