Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pytest-mock tutorial

import pytest
from src.calc import add


@pytest.mark.parametrize("a,b,expected",
							[(10, 5, 15),
							(-1, 1, 0),
							(-1, -1, -2)])
def test_add(a, b, expected):
	assert add(a, b) == expected
Comment

PREVIOUS NEXT
Code Example
Python :: set default dictionary in python 
Python :: iteration over dictionary 
Python :: python elif 
Python :: python 3.9 release date 
Python :: list comprehension in python 
Python :: python xgboost 
Python :: python newton raphson 
Python :: list append python 3 
Python :: how to use iteration in python 
Python :: df.info() in python 
Python :: how to sum only the odd values in python 
Python :: NEW CALENDAR MODULE 
Python :: do while loop python 
Python :: python print variable name 
Python :: python discord bot embed 
Python :: add in python 
Python :: how to clear combobox tkinter 
Python :: text to png python 
Python :: sort dict based on other list 
Python :: arch python 
Python :: printing with format 
Python :: prime numbers 1 to input 
Python :: c is better than python 
Python :: stackoverflow - import data on colabs 
Python :: Computation failed in `stat_flow()`: 
Python :: deduplication jaccard python 
Python :: access dynamicall to name attribute python 
Shell :: run laravel lumen server 
Shell :: uninstall k3s 
Shell :: test internet speed terminal linux 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =