<a name="readme-top"></a>
[![Contributors][contributors-shield]][contributors-url]<!--[![Forks][forks-shield]][forks-url]-->
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]<!--[![MIT License][license-shield]][license-url]--><!--[![LinkedIn][linkedin-shield]][linkedin-url]-->
[![PyPi version][pypi-shield]][pypi-url]<!--[![Python 2][python2-shield]][python-url]-->
[![Python 3][python3-shield]][python-url]
<!-- PROJECT LOGO -->
<br />
<div align="center">
<a href="https://github.com/NicolasMICAUX/autotestreg">
<img src="https://raw.githubusercontent.com/NicolasMICAUX/autotestreg/main/images/logo.png" alt="Logo" width="182" height="143">
</a>
<h3 align="center">AutoTest!Reg</h3>
<p align="center">
Automatically test your functions to see if you have changed their behavior by mistake!
<br />
<!--
<a href="https://github.com/NicolasMICAUX/autotestreg"><strong>Explore the docs »</strong></a>
-->
<br />
<br />
<a href="https://github.com/NicolasMICAUX/autotestreg">View Demo</a>
·
<a href="https://github.com/NicolasMICAUX/autotestreg/issues">Report Bug</a>
</div>
<!-- ABOUT THE PROJECT -->
## About The Project
<!-- [Screen Shot][product-screenshot] -->
Have you ever spent hours reworking someone else's code, trying not to break anything, only to realize at the last moment that something doesn't work anymore, but not knowing at which step you introduced the bug? So frustrating!
AutoTest!Reg allows you to automatically track the code you are working on and not introduce any regression, without writing a single test!
<!-- GETTING STARTED -->
## Getting Started
Using AutoTest!Reg requires no effort at all!
Install AutoTest!Reg with pip :
```sh
pip install autotestreg
```
Import AutoTest!Reg into your tests, adding this line:
```python
import autotestreg
```
To follow a function `my_func`, this code is all you need:
```python
from autotestreg import autotest_func
def my_func():
...
autotest_func(my_func)
```
To track an entire module `mypackage`, with all the functions and methods it contains:
```python
from autotestreg import autotest_module
import mypackage
autotest_module(mypackage)
```
<!-- USAGE EXAMPLES -->
## Next
If no regression was introduced when you modified the code, your tests will pass.
Otherwise, AutoTest!Reg will give you the function whose behavior was changed.
## Advanced usage
You can use AutoTest!Reg as a pre-commit hook:
1. Create some test files using `autotestreg` (e.g. `some_tests.py`)
- This file must contain at the top `from autotestreg import set_interactive` and `set_interactive(False)`
2. Modify the pre-commit hook script: `touch .git/hooks/pre-commit`
3. Add this inside:
```bash
#!/bin/sh
# Dont forget to activate your env if needed.
python some_tests.py
```
4. Make the pre-commit file executable: `chmod +x .git/hooks/pre-commit`
<p align="right">(<a href="#readme-top">back to top</a>)</p>
<!-- CONTRIBUTING -->
## Contributing
_(Section in english)_
I want to add a lot of functionnalities to this project, but I don't have much time to work on it. Contributions are welcome!
To install in dev mode, use `pip install -e .`
<!-- ROADMAP-->
### Roadmap/todo
<!-- table with columns : task, importance, difficulty, status, description -->
| Task | Importance | Difficulty | Contributor on it | Description |
|:-----|------------|------------|-------------------|:-------------|
| | ./5 | ./5 | NOBODY | _e.g._ : ... |
Non-Code contribution :
| Task | Importance | Difficulty | Contributor on it | Description |
|:-----|------------|------------|-------------------|:-------------|
| | ./5 | ./5 | NOBODY | _e.g._ : ... |
_For every todo, just click on the link to find the discussion where I describe how I would do it._
See the [open issues](https://github.com/NicolasMICAUX/autotestreg/issues) for a full list of proposed features (and known issues).
<p align="right">(<a href="#readme-top">back to top</a>)</p>
### How to contribute
Contributing is an awesome way to learn, inspire, and help others. Any contributions you make are **greatly appreciated**, even if it's just about styling and best practices.
If you have a suggestion that would make this project better, please fork the repo and create a pull request.
Don't forget to give the project a star! Thanks again!
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/YourAmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## Authors
This library was created by [Nicolas MICAUX](https://github.com/NicolasMICAUX).
<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[contributors-shield]: https://img.shields.io/github/contributors/NicolasMICAUX/autotestreg.svg?style=for-the-badge
[contributors-url]: https://github.com/NicolasMICAUX/autotestreg/graphs/contributors
[stars-shield]: https://img.shields.io/github/stars/NicolasMICAUX/autotestreg.svg?style=for-the-badge
[stars-url]: https://github.com/NicolasMICAUX/autotestreg/stargazers
[issues-shield]: https://img.shields.io/github/issues/NicolasMICAUX/autotestreg.svg?style=for-the-badge
[issues-url]: https://github.com/NicolasMICAUX/autotestreg/issues
[pypi-shield]: https://img.shields.io/pypi/v/autotestreg.svg?style=for-the-badge
[pypi-url]: https://pypi.org/project/autotestreg/
[python2-shield]: https://img.shields.io/badge/python-2.7+-blue.svg?style=for-the-badge
[python3-shield]: https://img.shields.io/badge/python-3.5+-blue.svg?style=for-the-badge
[python-url]: https://www.python.org/downloads/
[//]: # ([license-shield]: https://img.shields.io/github/license/NicolasMICAUX/autotestreg.svg?style=for-the-badge)
[//]: # ([license-url]: https://github.com/NicolasMICAUX/autotestreg/blob/master/LICENSE.txt)
[//]: # ([linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555)
[//]: # ([linkedin-url]: https://linkedin.com/in/othneildrew)
[product-screenshot]: images/screenshot.png
Raw data
{
"_id": null,
"home_page": "https://github.com/NicolasMICAUX/autotestreg",
"name": "autotestreg",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": null,
"keywords": "test, regression, automatically",
"author": "Nicolas Micaux",
"author_email": "micaux.nicolas@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/4d/b2/c941ba051d5beb7bf24d804d1f8118e7404437af85eb3debdc0a532bb2b6/autotestreg-0.2.1.tar.gz",
"platform": null,
"description": "<a name=\"readme-top\"></a>\n[![Contributors][contributors-shield]][contributors-url]<!--[![Forks][forks-shield]][forks-url]-->\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]<!--[![MIT License][license-shield]][license-url]--><!--[![LinkedIn][linkedin-shield]][linkedin-url]-->\n[![PyPi version][pypi-shield]][pypi-url]<!--[![Python 2][python2-shield]][python-url]-->\n[![Python 3][python3-shield]][python-url]\n\n\n<!-- PROJECT LOGO -->\n<br />\n<div align=\"center\">\n\n <a href=\"https://github.com/NicolasMICAUX/autotestreg\">\n <img src=\"https://raw.githubusercontent.com/NicolasMICAUX/autotestreg/main/images/logo.png\" alt=\"Logo\" width=\"182\" height=\"143\">\n </a>\n\n <h3 align=\"center\">AutoTest!Reg</h3>\n\n <p align=\"center\">\n Automatically test your functions to see if you have changed their behavior by mistake!\n <br />\n<!--\n <a href=\"https://github.com/NicolasMICAUX/autotestreg\"><strong>Explore the docs \u00bb</strong></a>\n-->\n <br />\n <br />\n <a href=\"https://github.com/NicolasMICAUX/autotestreg\">View Demo</a>\n \u00b7\n <a href=\"https://github.com/NicolasMICAUX/autotestreg/issues\">Report Bug</a>\n</div>\n\n\n<!-- ABOUT THE PROJECT -->\n## About The Project\n\n<!-- [Screen Shot][product-screenshot] -->\nHave you ever spent hours reworking someone else's code, trying not to break anything, only to realize at the last moment that something doesn't work anymore, but not knowing at which step you introduced the bug? So frustrating!\n\nAutoTest!Reg allows you to automatically track the code you are working on and not introduce any regression, without writing a single test!\n\n<!-- GETTING STARTED -->\n## Getting Started\nUsing AutoTest!Reg requires no effort at all!\n\nInstall AutoTest!Reg with pip :\n```sh\npip install autotestreg\n```\n\nImport AutoTest!Reg into your tests, adding this line:\n```python\nimport autotestreg\n```\n\nTo follow a function `my_func`, this code is all you need:\n```python\nfrom autotestreg import autotest_func\n\ndef my_func():\n ...\n\nautotest_func(my_func)\n```\n\nTo track an entire module `mypackage`, with all the functions and methods it contains:\n```python\nfrom autotestreg import autotest_module\nimport mypackage\n\nautotest_module(mypackage)\n```\n\n<!-- USAGE EXAMPLES -->\n## Next\nIf no regression was introduced when you modified the code, your tests will pass.\n\nOtherwise, AutoTest!Reg will give you the function whose behavior was changed.\n\n## Advanced usage\nYou can use AutoTest!Reg as a pre-commit hook: \n1. Create some test files using `autotestreg` (e.g. `some_tests.py`)\n - This file must contain at the top `from autotestreg import set_interactive` and `set_interactive(False)`\n2. Modify the pre-commit hook script: `touch .git/hooks/pre-commit`\n3. Add this inside:\n```bash\n#!/bin/sh\n# Dont forget to activate your env if needed.\npython some_tests.py\n```\n4. Make the pre-commit file executable: `chmod +x .git/hooks/pre-commit`\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n<!-- CONTRIBUTING -->\n## Contributing\n_(Section in english)_ \nI want to add a lot of functionnalities to this project, but I don't have much time to work on it. Contributions are welcome! \n\nTo install in dev mode, use `pip install -e .`\n\n<!-- ROADMAP-->\n### Roadmap/todo\n<!-- table with columns : task, importance, difficulty, status, description -->\n| Task | Importance | Difficulty | Contributor on it | Description |\n|:-----|------------|------------|-------------------|:-------------|\n| | ./5 | ./5 | NOBODY | _e.g._ : ... |\n\nNon-Code contribution :\n\n| Task | Importance | Difficulty | Contributor on it | Description |\n|:-----|------------|------------|-------------------|:-------------|\n| | ./5 | ./5 | NOBODY | _e.g._ : ... |\n\n\n_For every todo, just click on the link to find the discussion where I describe how I would do it._ \nSee the [open issues](https://github.com/NicolasMICAUX/autotestreg/issues) for a full list of proposed features (and known issues).\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n### How to contribute\nContributing is an awesome way to learn, inspire, and help others. Any contributions you make are **greatly appreciated**, even if it's just about styling and best practices.\n\nIf you have a suggestion that would make this project better, please fork the repo and create a pull request. \nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/YourAmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\n## Authors\nThis library was created by [Nicolas MICAUX](https://github.com/NicolasMICAUX).\n\n\n<!-- MARKDOWN LINKS & IMAGES -->\n<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->\n[contributors-shield]: https://img.shields.io/github/contributors/NicolasMICAUX/autotestreg.svg?style=for-the-badge\n[contributors-url]: https://github.com/NicolasMICAUX/autotestreg/graphs/contributors\n[stars-shield]: https://img.shields.io/github/stars/NicolasMICAUX/autotestreg.svg?style=for-the-badge\n[stars-url]: https://github.com/NicolasMICAUX/autotestreg/stargazers\n[issues-shield]: https://img.shields.io/github/issues/NicolasMICAUX/autotestreg.svg?style=for-the-badge\n[issues-url]: https://github.com/NicolasMICAUX/autotestreg/issues\n[pypi-shield]: https://img.shields.io/pypi/v/autotestreg.svg?style=for-the-badge\n[pypi-url]: https://pypi.org/project/autotestreg/\n[python2-shield]: https://img.shields.io/badge/python-2.7+-blue.svg?style=for-the-badge\n[python3-shield]: https://img.shields.io/badge/python-3.5+-blue.svg?style=for-the-badge\n[python-url]: https://www.python.org/downloads/\n\n[//]: # ([license-shield]: https://img.shields.io/github/license/NicolasMICAUX/autotestreg.svg?style=for-the-badge)\n[//]: # ([license-url]: https://github.com/NicolasMICAUX/autotestreg/blob/master/LICENSE.txt)\n[//]: # ([linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555)\n[//]: # ([linkedin-url]: https://linkedin.com/in/othneildrew)\n[product-screenshot]: images/screenshot.png\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Automatically test your functions to see if you have changed their behavior by mistake!",
"version": "0.2.1",
"project_urls": {
"Homepage": "https://github.com/NicolasMICAUX/autotestreg"
},
"split_keywords": [
"test",
" regression",
" automatically"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4db2c941ba051d5beb7bf24d804d1f8118e7404437af85eb3debdc0a532bb2b6",
"md5": "804273fc9c2710b90b7a1fa8fe67cb3f",
"sha256": "00bb37ed44750ad9def101a56e7059ad60d7153a064e13de08af11f2f8c998f9"
},
"downloads": -1,
"filename": "autotestreg-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "804273fc9c2710b90b7a1fa8fe67cb3f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 6404,
"upload_time": "2024-09-18T17:13:21",
"upload_time_iso_8601": "2024-09-18T17:13:21.078310Z",
"url": "https://files.pythonhosted.org/packages/4d/b2/c941ba051d5beb7bf24d804d1f8118e7404437af85eb3debdc0a532bb2b6/autotestreg-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-18 17:13:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "NicolasMICAUX",
"github_project": "autotestreg",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "autotestreg"
}