Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DuniterPy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
python
DuniterPy
Commits
266b1143
Commit
266b1143
authored
4 years ago
by
Moul
Browse files
Options
Downloads
Patches
Plain Diff
[doc]
#103
: Update and refactor Tests section with pytest usage
Move to CONTRIBUTING.md
parent
6648a89f
No related branches found
No related tags found
No related merge requests found
Pipeline
#12558
passed
4 years ago
Stage: checks
Stage: tests
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CONTRIBUTING.md
+17
-0
17 additions, 0 deletions
CONTRIBUTING.md
README.md
+0
-10
0 additions, 10 deletions
README.md
with
17 additions
and
10 deletions
CONTRIBUTING.md
+
17
−
0
View file @
266b1143
...
@@ -25,6 +25,23 @@ poetry run black duniterpy/file.py
...
@@ -25,6 +25,23 @@ poetry run black duniterpy/file.py
With
`pre-commit`
, Black is called on staged files, so the commit should fail in case black would make changes.
With
`pre-commit`
, Black is called on staged files, so the commit should fail in case black would make changes.
You will have to add Black changes in order to commit your changes.
You will have to add Black changes in order to commit your changes.
## Tests
We are using
[
`pytest` framework
](
https://docs.pytest.org/
)
.
-
Run all tests with:
```
bash
duniterpy> poetry run pytest
```
-
Run specific tests by specifying the path to a file:
```
bash
duniterpy> poetry run pytest tests/helpers/test_ws2p.py
```
-
You can even specify a test from the selected file:
```
bash
duniterpy> poetry run pytest tests/helpers/test_ws2p.py::test_generate_ws2p_endpoint
## Release workflow
## Release workflow
To handle a release, you have to respect this workflow:
To handle a release, you have to respect this workflow:
...
...
This diff is collapsed.
Click to expand it.
README.md
+
0
−
10
View file @
266b1143
...
@@ -111,16 +111,6 @@ poetry install
...
@@ -111,16 +111,6 @@ poetry install
make check
make check
```
```
*
Run all unit tests (builtin
`unittest`
module) with:
```
bash
make tests
```
*
Run only some unit tests by passing a special ENV variable:
```
bash
make tests
TESTS_FILTER
=
tests.documents.test_block.TestBlock.test_fromraw
```
## Packaging and deploy
## Packaging and deploy
### PyPI
### PyPI
Change and commit and tag the new version number (semantic version number)
Change and commit and tag the new version number (semantic version number)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment