Skip to content

Commit

Permalink
Add pytest-clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
baniasbaabe committed May 13, 2024
1 parent 9280c40 commit 36433eb
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions book/testing/Chapter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,42 @@
" body = conn.Object(\"mybucket\", \"test\").get()[\"Body\"].read().decode(\"utf-8\")\n",
" assert body == \"testtest\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Clean Output Diff with `pytest-clarity`"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Improving the output of pytest with one plugin?\n",
"\n",
"Use `pytest-clarity`.\n",
"\n",
"It brings a coloured diff output which is much cleaner than pytest's standard output."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install pytest-clarity"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pytest -vv --diff-width=60"
]
}
],
"metadata": {
Expand Down

0 comments on commit 36433eb

Please sign in to comment.