Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
ttaulli committed Aug 22, 2024
1 parent 002254e commit d7c7e9e
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
2 changes: 2 additions & 0 deletions 1-github-copilot-basics/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,5 @@ def add(a, b):





Binary file not shown.
50 changes: 49 additions & 1 deletion 6-debugging-testing-deployment/debugging.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
"- But provide a good start\n",
"- Different types of unit testing frameworks\n",
"- In your prompt, specify the framework\n",
"- Prompt: @workspace /new Create a new Python project that is for a simple calculator class. Allow unit testing\n",
"\n",
"\n",
"\n"
Expand All @@ -108,6 +107,55 @@
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Unit tests\n",
"# Check the functionality of individua units of code, such as functions or methods, in isolation\n",
"\n",
"def add(a, b):\n",
" return a + b"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Integration testing\n",
"# When units or components are tests as a group\n",
"# Goal is to verfiy that the interactions between the units are working as expected\n",
"\n",
"def add(a, b):\n",
" return a + b\n",
"\n",
"def multiply(a, b):\n",
" return a * b\n",
"\n",
"def add_and_multiply(a, b, c):\n",
" return multiply(add(a, b), c)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Performance testing\n",
"# Focus on speed, responsiveness, and stability of the system under a particular workload\n",
"\n",
"import time\n",
"\n",
"def slow_function():\n",
" time.sleep(2)\n",
" return True"
]
}
],
"metadata": {
Expand Down

0 comments on commit d7c7e9e

Please sign in to comment.