unitestify


Nameunitestify JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/victory-sokolov/unitestify
SummaryBase unittest scaffold package
upload_time2022-12-25 14:57:36
maintainer
docs_urlNone
authorViktor Sokolov
requires_python>=3.10,<4.0
licenseMIT
keywords django tests unittests
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Unitestify - Generate skeleton test file from Python file.

Support Unnitests and Django tests.

## How to use this package?


```bash
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`

```python
class Manager:

    def manage_data(self):
        return "Managing data"

    def retrieve_data(self):
        return "Retrieved data"
```

Here is our output file.

`test_data.py`

```python
import unittest

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

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

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/victory-sokolov/unitestify",
    "name": "unitestify",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "Django tests,unittests",
    "author": "Viktor Sokolov",
    "author_email": "viktorsokolov.and@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f5/34/22d4162153c0b0d622530a0fb256901f221aab1d95f6918cd2f3435b64f6/unitestify-0.1.0.tar.gz",
    "platform": null,
    "description": "# Unitestify - Generate skeleton test file from Python file.\n\nSupport Unnitests and Django tests.\n\n## How to use this package?\n\n\n```bash\npython unitestify --help\nUsage: unitestify.py [OPTIONS]\n\n  Unitestify command line arguments.\n\nOptions:\n  --file TEXT  Path to file from which to generate test file\n  --type TEXT  Type of test to generate\n  --help       Show this message and exit.\n```\n\nThere are two commands available:\n    * `--file` - Requires path to a Python file from which you want to generate the base test file.\n    * `--type` - Test type, `unittest` either `django`\n\n\n## Example\n\n`data.py`\n\n```python\nclass Manager:\n\n    def manage_data(self):\n        return \"Managing data\"\n\n    def retrieve_data(self):\n        return \"Retrieved data\"\n```\n\nHere is our output file.\n\n`test_data.py`\n\n```python\nimport unittest\n\nclass TestManager(unittest.TestCase):\n    \"\"\"TestManager.\"\"\"\n\n    def test_manage_data(self):\n        \"\"\"Test manage data.\"\"\"\n\n    def test_retrieve_data(self):\n        \"\"\"Test retrieve data.\"\"\"\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Base unittest scaffold package",
    "version": "0.1.0",
    "split_keywords": [
        "django tests",
        "unittests"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "4819c776fb1602b8831e51b75064efbe",
                "sha256": "573dd2cc31e128734a736ecdcf4fa2fbf906b1478ee0fdc7490ba6562a6953e6"
            },
            "downloads": -1,
            "filename": "unitestify-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4819c776fb1602b8831e51b75064efbe",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 4410,
            "upload_time": "2022-12-25T14:57:34",
            "upload_time_iso_8601": "2022-12-25T14:57:34.276052Z",
            "url": "https://files.pythonhosted.org/packages/b9/5c/06256d87981b0660351c2e96868118ee3b7c87101ed711540797e6ee5c8f/unitestify-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "6ee92fe91cce263285ad28d4fb51ed5f",
                "sha256": "444112aa73f0535cb7d8466691d77799a8510e1ceb43d23dba5d524b1d0cf46e"
            },
            "downloads": -1,
            "filename": "unitestify-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6ee92fe91cce263285ad28d4fb51ed5f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 3368,
            "upload_time": "2022-12-25T14:57:36",
            "upload_time_iso_8601": "2022-12-25T14:57:36.330120Z",
            "url": "https://files.pythonhosted.org/packages/f5/34/22d4162153c0b0d622530a0fb256901f221aab1d95f6918cd2f3435b64f6/unitestify-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-25 14:57:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "victory-sokolov",
    "github_project": "unitestify",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "unitestify"
}
        
Elapsed time: 0.33685s