add pytest
This commit is contained in:
parent
a5627c192d
commit
1698a2121e
|
@ -15,6 +15,25 @@ pip install git+{{ cookiecutter.project_url }}.git
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This project if a free software released under the {{ cookiecutter.open_source_license }}.
|
This project if a free software released under the {{ cookiecutter.open_source_license }}.
|
||||||
|
|
||||||
|
## Dev
|
||||||
|
|
||||||
|
If you want to tinker with this project, you can clone it and install it in editable mode:
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone {{ cookiecutter.project_url }}.git
|
||||||
|
cd {{ cookiecutter.project_slug }}
|
||||||
|
python -m venv venv && source venv/bin/activate
|
||||||
|
pip install -e .[dev]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Test
|
||||||
|
|
||||||
|
Tests are run using `pytest`:
|
||||||
|
|
||||||
|
```
|
||||||
|
pytest
|
||||||
|
```
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
@ -24,3 +43,4 @@ This project if a free software released under the {{ cookiecutter.open_source_l
|
||||||
## Security
|
## Security
|
||||||
|
|
||||||
If you discover a potential security issue in this project, please contact {{ cookiecutter.email }}.
|
If you discover a potential security issue in this project, please contact {{ cookiecutter.email }}.
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,20 @@ readme = "README.md"
|
||||||
requires-python = ">={{ cookiecutter.python_min_version }}"
|
requires-python = ">={{ cookiecutter.python_min_version }}"
|
||||||
dependencies = []
|
dependencies = []
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
test = [
|
||||||
|
"pytest >=7.2.2",
|
||||||
|
]
|
||||||
|
dev = ["{{ cookiecutter.project_slug }}[test]"]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
"Homepage" = "{{ cookiecutter.project_url }}"
|
"Homepage" = "{{ cookiecutter.project_url }}"
|
||||||
"Bug Tracker" = "{{ cookiecutter.project_url }}/issues"
|
"Bug Tracker" = "{{ cookiecutter.project_url }}/issues"
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
{{ cookiecutter.project_slug }} = "{{ cookiecutter.project_slug }}.cli:main"
|
{{ cookiecutter.project_slug }} = "{{ cookiecutter.project_slug }}.cli:main"
|
||||||
|
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
addopts = [
|
||||||
|
"--import-mode=importlib",
|
||||||
|
]
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
import {{ cookiecutter.project_slug }}
|
||||||
|
|
||||||
|
def test_dummy():
|
||||||
|
assert True
|
Loading…
Reference in a new issue