Skip to content

Instantly share code, notes, and snippets.

@zobayer1
zobayer1 / pytest_parametrize.md
Last active April 30, 2025 03:20
Using pytest parametrize with indirect for multiple test functions

Using pytest.mark.parametrize with other fixtures

Introduction

When you want to run tests against multiple test parameters, but you have to use other pytest.fixture objects, you can use pytest.mark.parametrize with indirect parameter to target a fixture for extracting request.param from parametrize list.

Example

@1f0
1f0 / cv2_streamiing.py
Last active April 27, 2023 06:14
cv2 rtmp streaming example
import numpy as np
import cv2
cap = cv2.VideoCapture('rtmp://localhost/live/stream')
while(True):
# Capture frame-by-frame
ret, frame = cap.read()
# Our operations on the frame come here
@dhilst
dhilst / gkos_char_device.c
Created April 29, 2013 01:12
Device Driver Hello World
/*
* file: gkos_char_device.c
*
* Desc: A simple device that
* echos a message when read,
* write method not implemented
*
* This was made on top of
* LDD and LKMPG examples
*