Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pytest - parameterizing tests



import pytest

@pytest.mark.parametrize("num, output",[(1,11),(2,22),(3,35),(4,44)])
def test_multiplication_11(num, output):
   assert 11*num == output
Comment

PREVIOUS NEXT
Code Example
Python :: Python - How To Count Occurrences of a Character in a String 
Python :: logarithms python 
Python :: how to install httplib in python 
Python :: monty hall problem in python 
Python :: delete and start fresh with db django 
Python :: sorting algorithms in python 
Python :: how to go up levels in path python 
Python :: spyder new instance 
Python :: replace multiple column values pandas 
Python :: stack data structure python 
Python :: python processpoolexecutor 
Python :: K-Means Clustering in Python – 3 clusters 
Python :: np matrix drop zero column 
Python :: remove element from list by index 
Python :: strip in split python 
Python :: compile python to exe bash 
Python :: python code to get wifi 
Python :: register admin django 
Python :: dict comprehension 
Python :: how to go to previous directory in os python 
Python :: list pop python 
Python :: iterate through list python with index 
Python :: invert binary tree with python 
Python :: invert list python 
Python :: python enumerate unique values 
Python :: TypeError: Direct assignment to the forward side of a many-to-many set is prohibited. Use .set() instead 
Python :: mean along third dimension array python 
Python :: how to call a python script from another python script 
Python :: .lift tkinter 
Python :: Reverse an string Using Extended Slice Syntax in Python 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =