Skip to main content

Base unittest scaffold package

Project description

Unitestify - Generate skeleton test file from Python file.

Support Unnitests and Django tests.

How to use this package?

python unitestify --help
Usage: unitestify.py [OPTIONS]

  Unitestify command line arguments.

Options:
  --file TEXT  Path to file from which to generate test file
  --type TEXT  Type of test to generate
  --help       Show this message and exit.

There are two commands available: * --file - Requires path to a Python file from which you want to generate the base test file. * --type - Test type, unittest either django

Example

data.py

class Manager:

    def manage_data(self):
        return "Managing data"

    def retrieve_data(self):
        return "Retrieved data"

Here is our output file.

test_data.py

import unittest

class TestManager(unittest.TestCase):
    """TestManager."""

    def test_manage_data(self):
        """Test manage data."""

    def test_retrieve_data(self):
        """Test retrieve data."""

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

unitestify-0.1.0.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

unitestify-0.1.0-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

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